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:

Figure: Search and Replace with a regular expression
Note: When using a regular expression, the Case sensitive and Whole word options do not apply as they should be specified in the regular expression.

Instead of simple string of text, enter a regular expression in the Containing text field.

Attention: Always test regular expressions thoroughly before using them. IXIASOFT recommends exporting some test content from the CCMS to use with testing. (You can download a number of free Find and Replace desktop utilities to use for testing regular expressions.) Once a Replace operation has taken place, there is no Undo or Rollback function!

Examples

Here are a few useful RegEx examples.

\b(ixia_locid)( |=)=? ?"\d+\b"
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.
\b(scalefit)(|=)=? ?("yes"|"no")
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.
\b(scale)(|=)=? ?"\d+\b"
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.
/^(https?:\/\/)?([\da-z\.-]+)\.
¶([a-z\.]{2,6})([\/\w \.-]*)*\/?$/
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:

Note: These external websites and tools are not affiliated with IXIASOFT in any way. IXIASOFT is not responsible for the content of these websites or the performance of these tools.