Skip to content

Commit 798fbdd

Browse files
committed
regex is lower-case
1 parent dd9b74a commit 798fbdd

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

articles/search/query-lucene-syntax.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ms.service: azure-ai-search
1010
ms.custom:
1111
- ignite-2023
1212
ms.topic: concept-article
13-
ms.date: 09/19/2024
13+
ms.date: 12/11/2024
1414
---
1515

1616
# Lucene query syntax in Azure AI Search
@@ -136,9 +136,14 @@ The following example helps illustrate the differences. Suppose that there's a s
136136

137137
## <a name="bkmk_regex"></a> Regular expression search
138138

139-
A regular expression search finds a match based on patterns that are valid under Apache Lucene, as documented in the [RegExp class](https://lucene.apache.org/core/6_6_1/core/org/apache/lucene/util/automaton/RegExp.html). In Azure AI Search, a regular expression is enclosed between forward slashes `/`.
139+
A regular expression search finds a match based on patterns that are valid under Apache Lucene, as documented in the [RegExp class](https://lucene.apache.org/core/6_6_1/core/org/apache/lucene/util/automaton/RegExp.html).
140140

141-
For example, to find documents containing `motel` or `hotel`, specify `/[mh]otel/`. Regular expression searches are matched against single words.
141+
In Azure AI Search, a regular expression is:
142+
143+
* Enclosed between forward slashes `/`
144+
* Lower-case only
145+
146+
For example, to find documents containing `motel` or `hotel`, specify `/[mh]otel/`. Regular expression searches are matched against single words.
142147

143148
Some tools and languages impose extra escape character requirements beyond the [escape rules](#escaping-special-characters) imposed by Azure AI Search. For JSON, strings that include a forward slash are escaped with a backward slash: `microsoft.com/azure/` becomes `search=/.*microsoft.com\/azure\/.*/` where `search=/.* <string-placeholder>.*/` sets up the regular expression, and `microsoft.com\/azure\/` is the string with an escaped forward slash.
144149

0 commit comments

Comments
 (0)