You can enjoy a better experience on our platform and the ability to gain valuable and actionable results by creating tailored custom searches in the Data Scanner.
How to create a custom search
Follow these steps to create a custom data scanner search. You will need to be an Account Admin to create a custom data scanner search. See Scanning data in apps for sensitive information for an overview of this process.
- From the Admin Console, select Apps.
- Find the app you would like to scan. Click the View link in the Data Scanner column.
- The main page of Data Scanner for this App displays. Here you can create Custom scans by clicking on Manage Configurations:
Adding a new custom scan
- To add a new custom scan, click Manage configuration. The Scan configurations and rules page displays:
- Click Add configuration to create a new custom search. Enter a new name for your configuration.
- Enter a percentage of probability for the scan threshold for your scans, so you can view results above certain probability. The minimum is 30%.
- Select the data you would like to scan and click Save.
Adding custom rules
-
If you would like custom rules for your scan, click the Custom Rules tab.
Enter a name for each rule, an optional description, any keywords, and set the likelihood that the regex will correctly identify the data it's searching for, with 100 being extremely likely.
Note: If the scan's probability threshold set is higher than the regex's probability score you set , data won't be included in scan results.
When you use key words, it increases the detection confidence of the entity you are searching for in case a specific word appears before or after it in the searched field. You can enter more than one key word with a comma delimiter (max length is 1024 characters). For example:arrhythmia,bradycardia,tachycardia
- Enter a valid regular expression.
- Click Save.
What is a regular expression?
A regular expression is a sequence of characters that specifies a match pattern in text. A regular expression, often called a pattern, specifies a set of strings required for a particular purpose. Regular expressions are extremely powerful.
Regular Expression Syntax Summary
Here are some common Regular Expression syntax.
Special characters
\ | escape special characters |
. | matches any character |
^ | matches beginning of string |
$ | matches end of string |
[5b-d] | matches any chars '5', 'b', 'c' or 'd' |
[^a-c6] | matches any char except 'a', 'b', 'c' or '6' |
R|S | matches either regex R or regex S |
() | creates a capture group and indicates precedence |
Special sequences
\A | start of string |
\b | matches empty string at word boundary (between \w and \w \) |
\B | matches empty string not at word boundary |
\d | digit |
\D | non-digit |
\s | whitespace: | \t\n\r\f\v] |
\S | non-whitespace |
\w | alphanumeric: [0-9a-zA-2_] |
\W | non-alphanumeric |
\Z | end of string |
\g<id> | matches a previously defined group |
Quantifiers
* | O or more (append ? for non-greedy) |
+ | 1 or more (append ? for non-greedy) |
? | O or 1 (append ? for non-greedy) |
{m} | exactly m m occurrences |
{m,n} | from m to n. m defaults to 0, n to infinity |
{m,n}? | from m to n, as few as possible |
Examples
Here are some of examples:
Date Finder
To recognize a date as "mm/dd/yyyy or mm/dd/yy".
r"\b(([1-9]|0[1-9]|1[0-2])/([1-9]|0[1-9]|[1-2][0-9]|3[0-1])/(\d{4}|\d{2}))\b"
Date validation
This checks for a valid date format:
\d{4}-\d{2}-\d{2}
In this example, the code validates if given date string matches this pattern: YYYY–MM–DD, for example, 2019–12–18.
How to view and edit configurations
Follow these steps to view and edit a configuration.
- From the Admin Console, select Apps. Find the app you would like to scan. Click the View link in the Data Scanner column.
-
The main page of Data Scanner for this App displays. Here you can access configurations and rules by clicking on Manage Configurations
- You can view or edit your custom searches.
How to start a custom search
Follow these steps to start a custom data scanner search. You will need to be an Admin for the app you want to scan.
- From the Admin Console, select Apps. Find the app you would like to scan. Click the View link in the Data Scanner column.
-
Click on the View link for the app you want to create a custom scan. The Custom Scan page displays:
-
Select a configuration from the Scan configuration dropdown.
- Click Start Scan.
We store scan details for 31 days. Click Export scan history to CSV, to save the scan results locally.
Limits
The following are the known limits with the custom search functionality .
-
Number of Configurations for Scan Regex - 50 per account
-
Number of Configurations for Scan Patterns - 50 per account
-
Max Min Probability - Maximum probability is 100 % , minimum selectable probability is 30 %