Search and replace with Regular Expressions
In addition to using Search and Replace to find and 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.
To use a regular expression when searching, select Regular expression on the Search and Replace dialog box:
Instead of string of text, enter a regular expression in the Containing text field.
When using a regular expression, the Case sensitive and Whole word options do not apply as they should be specified using a regular expression.
Examples
The following are a few useful RegEx examples.
|
This expression finds all occurrences of the ixia_locid attribute in content, along with values of any number of digits. You can use it to remove these attributes and clean up your content if you have decided not to use autotranslate. |
|
This expression finds all occurrences of the scalefit attribute on content, along with both "yes" and "no" values. You can use it to remove @scalefit attributes if you want to allow an OT plugin to autoscale large images. |
|
This expression finds all occurrences of the scale attribute in content, along with values of any number of digits. You can use it to remove @scale attributes if you want to allow an OT plugin to autoscale large images. |
|
This expression matches all URLs in content. Note: The paragraph symbol (¶) in the expression is
not part of the expression. It is used so that the expression
fits in this table. The expression should be entered as a single
line with no space. |
If you need help writing a regular expression, contact IXIA CCMS 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)