Okapi ComponentsSearch And Replace Utility |
|
- Overview |
- The utility set identifier for this utility is: oku_set04
- The utility identifier is: searchandreplace
The Search And replace utility allows you to search for a set of text patterns and replace then with another. You can use regular expression if needed. The input files can be read through the filters, or as plain text.
The common parameters are the options specified from the application calling the utility rather than in the options dialog box of the utility itself. For this utility the common parameters you need to specify are the following:
Files of the first input list | - Needed (the files to process) |
Root for the first input list | - Not Needed |
Files of the second input list | - Not Needed |
Root for the second input list | - Not Needed |
Files of the third input list | - Not Needed |
Root for the third input list | - Not Needed |
Input language | - Not Needed |
Output language | - Not Needed |
Input default encoding | - Needed |
Output default encoding | - Not Needed |
Location and names for output files | - Needed |
The items list contains three columns:
To edit an item : Double-click the item, or click the Edit button. To check and un-check an item: Click the checkbox, or press Space when the item is selected.
Add -- Click this button to add a new item in the list. This opens the Search and Replace Item dialog box.
Edit -- Click this button to edit the item currently selected. This opens the Search and Replace Item dialog box.
Remove -- Click this button to remove the item currently selected from the list.
Move Up -- Click this button to move the item currently selected upward.
Move Down -- Click this button to move the item currently selected downward.
Export -- Click this button to export the current options to a separate standalone file.
Import -- Click this button to import a separate standalone file into the current options. You will be prompted to either: a) overwrite all the current options with the ones in the file, or b) only append the search/replace items listed in the file at the end of the current ones.
Process the files as plain text -- Set this option to process the input files as plain text, that is without reading them through a filter. When this option is set: all parts of the file are searched, also the file is seen exactly like it would be in a text editor (no conversion of escaped characters is done for example). when this option is not set: only the text seen as translatable by the filter associated with the input file will be modified.
Use regular expressions -- Set this option to enable the Regular Expressions mode.
When this option is checked several regular expression options are accessible. They apply to all expressions, not just the selected one:
Ignore case -- Set this option to ignore the cases in the matches. for example "bear" matches "Bearcat", "BEARCAT", and "bearcat".
Multiline -- Set this option to changes the meaning of ^ and $ so that they match at the beginning and end of any line, not just the beginning and end of the whole string.
ECMAScript-compliant behavior -- Set this option to enable ECMAScript-compliant behavior for the expression.
Dot also matches line-feed -- Set this option to changes the meaning of the period character '.' so that it matches every character instead of every character except \n.
Search expression -- Enter the text or the regular expression to search for.
Replacement expression -- Enter the text or regular expression to replace with.
Note that the line-break and tabulation characters cannot be entered
directly. You should use the regular expression mode and can use \n
and \t
respectively.
If you set the Use Regular Expression option,
the search text can use any of the expressions defined in the
regular expression syntax, and the
replacement text can use any of the
Substitutions (for
example $&
is seen as the copy of the current match) or
Escapes (for example \t
is seen as a tabulation).
If you do not set the Use Regular Expression
option, the search and replacement text is use exactly like you type it:
they are no escape mechanism of any sort (for example \t
is seen as
a '\
' follow by a 't
' not as a tabulation character).