Regular expressions

Regular expressions specify string matching patterns, and are used in the matches, matchgroup, replaceall and split functions. Regular expressions are also used in report definitions. Regular expression pattern matching is more powerful than simple wildcards, but with this power comes additional complexity.

CD.*Match a string starting with CD and ending with anything
[CD].*Match a string starting with C or D and ending with anything
[^CD].*Match any string not starting with C or D
[a-z].*Match any string starting with lower case a to z
[A-Za-z]+(\d)Match a string of one or more alphabetic characters followed by a number. Capture the number in capture group 1.

Simple introductory guides to using regular expressions can be found on the web. Try searching for 'regular expression tutorial'. Many programmers and systems have implemented regular expressions, and there may be differences between packages. Patchworks uses the Java JDK implementation of regular expressions, which will have all basic features, but may omit advanced features or implement them differently.

The definitive reference details about the Patchworks regular expression syntax are located in the Java documentation of the Pattern class. Also check the web for useful resources for composing and testing regular expressions.