Java Glossary : Search and Replace

CMP home Java glossary home Menu no menu Last updated 2004-06-28 by Roedy Green ©1996-2004 Canadian Mind Products

Java definitions: 0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

You are here : home : Java Glossary : S words : Search and Replace.

logoSearch and Replace
SR32.exe is Funduc's utility to search and replace strings in files. It has regular expressions, scripts, and magic replacement strings like:
Search and Replace Magic Replacement Strings
%%srfound%% Returns the current search string.
%%srfound %% - Special A special form of the %%srfound%% operator can be used to strip specified characters from the search hit. The form is: %%srfoundcharacters to remove specified here%%, where characters to remove specified here is one or more characters which, if present in the search hit, will be removed from the replace. Example: Upon a replace operation, %%srfoundiex %% removes the letters i, e, x, and <spaces> from the search hit.
%%srpath%% Returns the path (without filename) of the current file.
%%srfile%% Returns the file name (without path). This can be used to customise generic boilerplate with the file name.
%%srfiledate%% Returns the current date stamp of the file. This is the date prior to a replace made by Search and Replace.
%%srfiletime%% Returns the current time stamp of the file. This is the time prior to a replace made by Search and Replace.
%%srfilesize%% Returns the file size prior to the replace made by Search and Replace.
%%srdate%% Returns the current date of the machine.
%%srtime%% Returns the current time of the machine.
%%srprepend%%
%%srappend%%
Used in Search and Replace scripts -- The search string will be prepended or appended to the file as a literal string.
%%envvar=fruit%% returns the contents of the SET fruit=strawberry environment variable. This can be used to customise boilerplate.
It can be used, with difficulty (See the Quoter Amanuensis for help), to find and replace standard sections of multiline boilerpate. It can renumber items with the %n>> operator. You can write scripts to do relatively complex editing tasks on a series of files unattended. It is very quick. The Quoter Amanuensis helps you compose regular expressions for it.

It has a companion configuring utilty srconfig.exe.


CMP logo
CMP_home
home
Canadian Mind Products CSS
HTML Checked!
ICRA ratings logo
mindprod.com IP:[24.87.56.253]
Your IP:[80.134.30.163]
You are visitor number 3864.
Please send errors, omissions and suggestions
to improve this page to Roedy Green.
You can get a fresh copy of this page from: or possibly from your local J: drive mirror:
http://mindprod.com/jgloss/searchreplace.html J:\mindprod\jgloss\searchreplace.html