- Search Overview
- Search Home Page
- Performing Searches
- Basic Search
- Advanced Search
- Advanced Search Building Blocks
- Running an Advanced Search Query
- Query Syntax
- Query by Subject
- Query by Vendor and Product
- Query by Field and Value
- Query by Context Table
- Query Using Regex
- Free Text Search
- Query Using Advanced Query Language Operators
- Query Using Aggregation Functions
- Query Using Structured Fields
- Dynamic Field Extraction
- Natural Language Search
- Anomaly Search
- Refine a Search
- Context Tables in Search
- Search Best Practices
- Search Results
- Dashboard Visualizations
Query Using Regex
Search supports all standard Regex searches.
Regex use in Search is based on the Golang flavor of Regex. For reference information about regex syntax, see the following sites:
regex101 – Select the Golang flavor from the panel on the left. Then enter a specific Regex pattern to see an explanation.
https://regexr.com/ – Enter a specific Regex pattern to see an explanation (not Golang-specific but very user-friendly).
https://github.com/google/re2/wiki/Syntax – Reference to understand the specific Regex capabilities Exabeam supports.
Note
Regex can be complex with a steep learning curve, so you might want to experiment and test your queries before entering them into the Search application.
Use the following tool to test your queries: regex101.
The following topics describe the regular expression syntax supported by Search:
Regex (RGX) Operators
Perform complex case sensitive or case insensitive queries using the RGX or RGXi operators.
Note
Regex operators will also work with query by field searches.
Operator Descriptions | Example Syntax |
---|---|
To indicate that an expression should be treated as Regex, start with either RGX or RGXi and enclose the Regex in double quotes inside of parentheses. | Case Sensitive Syntax: Performs a case-sensitive search and will match Case Insensitive Syntax: Performs a case-insensitive search and will match |
To group expressions within Regex, use parentheses. | Syntax: Will match |
A double quote is a reserved character in Regex. To use a double quote within a Regex but preserve its literal meaning, it must be escaped by preceding it with a backslash. | Syntax: Will match The following syntax (with un-escaped quotes) will return an error: |
Brackets are reserved characters in Regex. To use brackets within a Regex but preserve their literal meaning, they must be escaped by preceding them with a backslash. | Syntax: RGX("\(Microsoft\)") Will match The following syntax that uses brackets within brackets will return an error: |
A backslash is a reserved character in both Regex and Exabeam Query Language. To use a backslash within a Regex but preserve its literal meaning, it must be escaped from both languages using additional backslashes. This requires using four backslashes in a row, as shown below.
|
Will match |
Regular Expression Examples
Important
Search now supports new regex and wildcard operators. The new syntax supersedes earlier syntax which will be deprecated in a later release. For more information, see Query Syntax.
The following table illustrates examples of regular expressions, including sample results of what this query might find:
Regex Syntax Examples | Description | Sample Results |
---|---|---|
| Run a case-sensitive search for any vendor field value that contains the token |
|
| Run a case-sensitive search for any vendor field value that contains the token string |
|
| Search for any |
|
| Search for any user field value that exactly matches the string | SQK |
| Search for any user field values that have any numeric character occurring between 7 and 15 times, inclusive. |
|
| Search for any Use a backslash to escape any forward slashes: |
|
| Search with the hex representation of a character. |
|
Note
Search does not support listing comma-separated Regex expressions enclosed within parentheses ().
For example:
This query results in an error:
vendor = RGX("Ap\w\w/","/Ex.*/","/Micr.*")
These equivalent queries work:
vendor = RGX("Ap\w\w") OR vendor = RGX("Ex.*") OR vendor = RGX("Micr.*")
Wildcard (WLD) Operators
Perform complex case sensitive or case insensitive wildcard queries using the WLD or WLDi operators.
Note
Wildcard operators will also work with query by field searches.
Operator Descriptions | Example Syntax |
---|---|
To indicate that an expression is using wildcard characters, start with either WLD or WLDi and enclose the expression in double quotes inside of parentheses. | Case Sensitive Syntax: Case Insensitive Syntax: |
| Syntax: Will match Syntax: Will match |
| Syntax: Will match Syntax: WLDi("w?b") Will match |