Advanced Search and Replace

replace_demo  Replace_text_in_multiple_files 
Advanced Search and Replace Features:
* Supports regular expression and multiple line search and replace
* Can search and replace text in multiple files
* Can add,delete,insert text or cut and reorganize the matched strings
* Can apply variables like "line_no" or "word_no" on the matched strings
* Can apply functions like "reverse","uc(uppercase)","sort" on the matched strings
* Can replace whole word,line or paragraph that containing searched strings
* Can make multiple search and replace in one time by providing multiple rules
* Every operation is automatically recorded into script, can modify and re-use

Column Exchange - Advanced Search and Replace

Example

Reverse order the 2,3,4,5 words of each line.

Advanced search and replace

Procedures:

1) ctrl-o open source text file

2) ctrl-h open 'replace' dialog

3) set 'Replace Unit' to 'Line'

4) set 'Replace with pattern' to '$match[1,5,4,3,2,6..]'

5) click 'Replace', the column 1,2,3,4,5,6 will be changed to 1,5,4,3,2,6


Line Merge - Advanced Search and Replace

Example

Join every 3 lines into one line

Advanced search and replace

Procedures:

1) ctrl-o open source text file

2) ctrl-h open 'replace' dialog

3) set 'Unit number filter' to '!3<3>'

4) set 'Search for pattern' to '\n'(\n means newline)

5) set 'Replace with pattern' to nothing

6) click 'Replace', all line breaks except 3,6,9,12,... will be removed

Notes:

3<3> means 3,6,9,12,...(start from 3, step is 3).

!3<3> means 1,2,4,5,7,8,10,11,(not 3,6,9,12,15,...)

Advanced Text Sort - Advanced Search and Replace

Example

Sort all lines by the value of second word

Procedures:

1) ctrl-o open source text file

2) ctrl-h open 'replace' dialog

3) set 'Replace with pattern' to "sort_by_word($match,2,2,'num')"

4) click 'Replace', all lines will be sorted by the value of second word

Example

Sort all words by the length

Procedures:

1) ctrl-o open source text file

2) ctrl-h open 'replace' dialog

3) set 'Replace with pattern' to "join(' ',sort { length($a)<=>length($b) } split(' ',$match))"

4) click 'Replace', the text will be sorted by the value of second word

Notes:

For batch replace files, please refer to Replace Pioneer help manual.


', '>',$fString); $fString = str_replace( '<', '<',$fString); $fString = str_replace( chr(32), ' ',$fString); $fString = str_replace( chr(13), ' ',$fString); $fString = str_replace( chr(10) & chr(10), '
',$fString); $fString = str_replace( chr(10), '
',$fString); } return $fString; } function show_pages($page,$MaxPage,$colname_rs) { echo " Page:$page/$MaxPage    "; if ($MaxPage<=1) {return;} echo "Goto: "; if ($page>1) { $prevPage=$page-1; echo "\"Previous  "; } for($p=$page-10;$p<=$page-1;$p++) { if ($p>0) { echo "$p ";} } echo "$page "; for($p=$page+1;$p<=$page+10;$p++) { if ($p<=$MaxPage) { echo "$p ";} } if ($page<$MaxPage) { $nextPage=$page+1; echo " \"Next "; } echo ""; } //$dbid = mysql_connect($hostname,$dbuser,$dbpasswd) or die(""); //mysql ServerNorthWind //$db = mysql_select_db("mindp9_test",$dbid) or die(""); //SQL $query = "SELECT * FROM ("; for($i=0;$i $MaxPage) $page=$maxPage; ?>

Other Examples of "" " .HtmlEncode($arr[2]).""; } //if }//for echo "
"; }//if ?> Search all "" examples