Perl Compatible Regular Expression Syntax

The Perl Compatible Regular Expressions (PCRE) library that is used by Watson™ Explorer Engine implements most of the regular expression syntax supported by Perl version 5. For a list of the differences between PCRE and Perl 5 regular expressions, see the PCRE entry on Wikipedia.

The use of PCRE is primarily focused on its support for UTF-8 characters as a match for a single wildcard character ('.'). For more detailed comparisons of POSIX and PCRE regular expression capabilities, see sites such as Regular-Expressions.info.

Note: The PCRE word boundary (\b) sequence does not match non-ASCII characters, as documented in the PCRE documentation. To match a word containing both ASCII and non-ASCII, use the \W sequence.

Watson Explorer Engine functions such as viv:test enable you to identify the type of pattern matching that you want to use when comparing a string and a regular expression pattern by specifying an optional parameter. When creating a custom parser for a Watson Explorer Engine source, regex, perl-regex, case-insensitive-regex, and case-insensitive-perl-regex are all valid types for identifying the regular expression syntax used by your parser.