Search and replace with Regular Expressions
In addition to using Search and Replace to find a replace simple strings of text, you can run a more precise search using Regular Expressions (RegEx). RegEx enables you to precisely match a certain pattern in your search, which helps ensure you find only the content you're looking for.
To use a regular expression when searching, select Regular expression on the Search and Replace dialog box:
Instead of simple string of text, enter a regular expression in the Containing text field.
Examples
Here are a few useful RegEx examples.
|
Matches all occurrences of the ixia_locid attribute in content, along with values of any number of digits. Useful if you have decided not to use autotranslate and want to remove these attributes to clean up your content. |
|
Matches all occurrences of the scalefit attribute on content, along with both "yes" and "no" values. Useful for removing @scalefit to allow an OT plugin to autoscale large images. |
|
Matches all occurrences of the scale attribute in content, along with values of any number of digits. Useful for removing @scale to allow an OT plugin to autoscale large images. |
Note: The paragraph symbol (¶) indicates a hard return to enable the
RegEx to fit within the table column here. It is not part of the
expression. The expression should be entered as a single line
with no space between the period and the open
parenthesis.
|
Matches all URLs in content. |
If you need help writing a regular expression, contact IXIASOFT Customer Support.
Additional Resources
Here are some good online resources for understanding regular expressions:
Here are a few useful Find and Replace utilities:
- FAR - Find and Replace Tool (Windows)
- TextCrawler (Windows)
- Find & Replace It! (Mac, Linux)