Skip to content

Commit

Permalink
[DOCS] SQL: Update link for supported regex in RLIKE docs (#55830)
Browse files Browse the repository at this point in the history
The`RLIKE` function docs points users to [Java’s Pattern class doc][0]
for regular expression syntax. However, these docs include shorthand
character classes, such as `[\d]`, `[\s]`, and `[\w]`. These character
classes are not supported in Elasticsearch, which may confuse users.

This updates the SQL `RLIKE` docs to refer to the ES [regular expression
syntax docs][1], which only documents supported syntax.

[0]: https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/regex/Pattern.html
[1]: https://www.elastic.co/guide/en/elasticsearch/reference/master/regexp-syntax.html

Relates to #55231
  • Loading branch information
jrodewig committed Apr 28, 2020
1 parent 29e36fc commit 8e24bcf
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions docs/reference/sql/functions/like-rlike.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@ RLIKE constant_exp <2>
This operator is similar to `LIKE`, but the user is not limited to search for a string based on a fixed pattern with the percent sign (`%`)
and underscore (`_`); the pattern in this case is a regular expression which allows the construction of more flexible patterns.

For more details about the regular expressions syntax, https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/regex/Pattern.html[Java's Pattern class javadoc]
is a good starting point.
For supported syntax, see <<regexp-syntax>>.

[source, sql]
----
Expand Down

0 comments on commit 8e24bcf

Please sign in to comment.