---
sourceDocument: Xanadu ServiceNow AI Platform Administration
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/xanadu/platform-administration

 Release :

    - xanadu

ft:locale :

    - en-US

ft:publication_title :

    - Xanadu ServiceNow AI Platform Administration

ft:clusterId :

    - platadm

bundleId :

    - platadm

workflow :

    - Platform


---

# Test regular expression patterns in Search Suggestion Exclusion List Rule entries

# Test regular expression patterns in Search Suggestion Exclusion List Rule entries {#ariaid-title1}

* Release version: Xanadu
* 
* Updated July 31, 2025
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 minute to read

Regular expression patterns are powerful and often require editing to get the correct behavior. When using regular expression patterns to exclude search strings, test the patterns thoroughly so as not to have unintended
results.

## Before you begin

Make sure you're familiar with Java's regular expression pattern syntax. To learn about regular expression pattern syntax, see [the Javadoc for the java.regex.util.Pattern class](https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html).

Role required: admin

## About this task

The Exclusion List Rule and Search Suggestion Relations
\[m2m_blacklist_search_suggestion\]
table lists the suggestions eliminated from the Search Suggestion \[sys_search_suggestion\] table by entries in the Search Suggestion Exclusion List
\[sys_search_suggestion_blacklist\]
table.

## Procedure

1. In your browser, navigate to https://\<instance name\>.service-now.com/m2m_blacklist_search_suggestion_list.  
   A list of words excluded from search suggestions appears in the Exclusion List Rule and Search Suggestion Relations table. The Suggestion column shows the search string that was eliminated in the creation of suggestions.
2. Add a regular expression pattern to the exclusion list table.  
   For more information, see [Preventing suggestions in special cases](https://servicenow-prod.fluidtopics.net/LkCs0BIkSoiA_7Z8FNwIkA "Disable generation of suggestions from specific search strings to keep unhelpful terms from appearing in suggestions or to prevent disclosure of personal or secure information.").
3. In a search field, for example, on the ServiceNow® Service Portal, enter words that satisfy the regular expression pattern.
4. Run the script that builds the search suggestions.  
   For more information, see [Schedule the Build Search Suggestions script](https://servicenow-prod.fluidtopics.net/wBDQE~5d2ly06VTK84Ix7A "Specify when to run the script that builds auto-complete suggestions and search suggestions from user search strings."). Select Execute Now to run the script immediately.
5. In the m2m_blacklist_search_suggestion_list table, select the menu icon ![]() for the Exclusion List column heading, then select Group By Exclusion List to see the regular expression patterns and what they eliminated.
6. Review the suggestions in the table to see if the regular expression patterns removed the suggestions they should have and no more.
7. In the sys_search_suggestion_blacklist table, set an excluded regular expression pattern's Active field to false, then run the Build Search Suggestions script again to make sure that only excluded suggestions were removed.
8. Revise the regular expression patterns if necessary and repeat the procedure.

