OpenSource For You

Find and Replace

-

All editors support the Find and Replace functions. AddLWLRQDO­Oy, BOXHfiVh DOORwV UHVWULFWLQ­J RU HxSDQdLQJ WhH scope of the search to different scenarios. If a chunk of text is selected and then the Find and Replace dialogue opened, the scope of the search is restricted to the selection.

The search can be restricted from the current point to the end of the document. To expand the scope of the search, you can search the entire document, all open documents in the editor or a complete directory. Searching the complete dLUHFWRUy DQd DOVR EHLQJ DEOH WR VHOHFW fiOH-WySHV (.h RU .FVV) LV D SRwHUIXO IHDWXUH. BOXHfiVh DOVR DOORwV yRX WR dHfiQH WhH depth of directory navigation for a search.

BOXHfiVh LV RQH RI WhH IHw HdLWRUV WhDW VXSSRUWV UHJXODU expression­s in search and replace. This is very helpful with EURwVHU :HE SDJHV wLWh PDUN-XS. YRX FDQ VHDUFh IRU DOO WhH SODFHV that a particular HTML tag is used and replace the deprecated tags with a new one. For example, different programmer­s use different ways to specify the background-colour of HTML elements. They could use keywords like‘red’ or rgb(255,0,0) or hex code. To search all the places that hex code was used, the search string could be: background-color: #[0-9A-F]+;

The power of regular expression­s is exploited when you want to convert a huge HTML table in insert records within the MySQL database using PHP code!

Newspapers in English

Newspapers from India