Regular Expression Operators

Regular expression queries in the Work Center search support the regexp and query_string queries. The Work Center search regular expression engine does not allow all types of regular expression operators.

Supported Operators

This section describes the supported operators.


In Work Center, a regex search is automatically wrapped with the ^ or $ anchors to address full-word content. During a search, the regex is applied to each word in an item's text fields. If at least one word an item corresponds to the given regex, that item is returned in the search results. This means you do not need to use ^ or $ before or after your string.

For example, to find the string "DEF1234" you can use:


This returns a match for "DEF1234". However, this does not:


Reserved Characters

You can use any Unicode character in your query, except for the following reserved characters, which must be escaped:

. ? + * | { } [ ] ( ) " \
Note that when using the optional operators listed below, the following characters are also reserved:
# & < >  ~

To escape a reserved character, use a backslash "\*". To escape a backslash, use "\\".

Characters that are surrounded by double quotes are treated literally (except for double quotes themselves):

Match One or More Times

Use the plus symbol "+" to match the preceding element one or more times. The following matches string "DMPROD_EEC_22239":


Match any Character

Use a period "." in place of any character. The following matches string "DMPROD_EEC_22239":


Match Zero or More

Use an asterisk "*" to match the preceding element zero or more times. The following matches string "DMPROD_EEC_22239":


Match Zero or One

Use a question mark "?" to match the preceding element zero or one time (in other words, make it optional). The following matches string "DMPROD_EEC_22239":


However, this does not:


Match Between n and m Times

Use curly brackets {} to match the preceding element at least n times, but no more than m times, where n and m are integers. For example:

  • {3} – Repeat exactly three times.
  • {2,4} – Repeat at least twice, but no more than four times.
  • {3,} – Repeat at least three times.

The following match string "DMPROD_EEC_22239":


However, this does not:



Use parentheses "()" to form sub-expressions. Use the quantity operators above to operate on the shortest previous element as a group.

The following match string "DMPROD_EEC_22239":


However, this does not:



Use the pipe symbol "|" as an OR operator. This means a match is found if either the left side of the pipe symbol is found or if the right side of the pipe symbol is found. The alternation applies to the longest patter, not the shortest.

The following match string "DMPROD_EEC_22239":


However, this does not:


Character Classes

To match a string that contains a range of characters (e.g. "DEF-12345):

Use square brackets [] to indicate a range of characters:


Use a dash - to specify a range of characters within square brackets.


The dash is literal if it is used as the first character or if it is properly escaped \-:

Note: A dash - is treated as a regular symbol if it is outside square brackets or if it the first character inside the brackets. To use a dash as a regular symbol inside square brackets, it must be escaped.

Use a leading carat ^ to specify characters that must not appear for a match to occur:


However, these do not match:


Optional Operators

Available optional operators are listed below.


Use the tilde symbol "~" to negate the shortest pattern that follows it. For example, when using an expression like "xy~z1":

  • The match starts with x
  • Followed by y
  • Followed by a string of any length that is not z
  • And ends with 1

The following match string "DMPROD_EEC_22239":


However, this does not:



Use angle brackets "<>" to indicate a numeric range.

The following match string "DMPROD_EEC_22239":


However, this does not:



Use an ampersand "&" to require that both patterns have to match.

The following matches string "DMPROD_EEC_22239":


However, this does not:


Consider re-writing your regular expression if you are using the intersection option.