Page 98      All Pages  All Books
Attribute
Description
Required
pattern
The regular expression pattern to match in the token.
Yes
replace
The substitution pattern to replace the matched regular expression. When omitted the orignal token is returned.
No
flags
See ReplaceRegexp for an explanation of regex flags.
No
Examples:
Filter lines that contain "hello" or "world", ignoring case. <tokenfilter>
<containsregex pattern="(hello|world)" flags="i"/> </tokenfilter>
This example replaces lines like "SUITE(TestSuite, bits);" with "void register_bits();" and removes other lines. <tokenfilter>
<containsregex
pattern="^ *SUITE\(.*,\s*(.*)\s*\).*"
replace="void register_\1();"/> </tokenfilter>
52 of 130

Page 98      All Pages  All Books