Class PatternMatchingFunctions
java.lang.Object
com.couchbase.client.java.query.dsl.functions.PatternMatchingFunctions
@Experimental @Public public class PatternMatchingFunctions extends Object
DSL for N1QL functions in the Pattern Matching category.
Pattern-matching functions allow you to work determine if strings contain a regular expression pattern.
You can also find the first position of a regular expression pattern and replace a regular expression with another.
- Since:
- 2.2
- Author:
- Simon Baslé
-
Method Summary
Modifier and Type Method Description static Expression
regexpContains(Expression expression, String pattern)
Returned expression results in True if the string value contains the regular expression pattern.static Expression
regexpContains(String expression, String pattern)
Returned expression results in True if the string value contains the regular expression pattern.static Expression
regexpLike(Expression expression, String pattern)
Returned expression results in True if the string value matches the regular expression patternstatic Expression
regexpLike(String expression, String pattern)
Returned expression results in True if the string value matches the regular expression patternstatic Expression
regexpPosition(Expression expression, String pattern)
Returned expression results in the first position of the regular expression pattern within the string, or -1.static Expression
regexpPosition(String expression, String pattern)
Returned expression results in the first position of the regular expression pattern within the string, or -1.static Expression
regexpReplace(Expression expression, String pattern, String repl)
Returned expression results in a new string with all occurrences of pattern replaced with repl.static Expression
regexpReplace(Expression expression, String pattern, String repl, int n)
Returned expression results in a new string with occurrences of pattern replaced with repl.static Expression
regexpReplace(String expression, String pattern, String repl)
Returned expression results in a new string with all occurrences of pattern replaced with repl.static Expression
regexpReplace(String expression, String pattern, String repl, int n)
Returned expression results in a new string with occurrences of pattern replaced with repl.
-
Method Details
-
regexpContains
Returned expression results in True if the string value contains the regular expression pattern. -
regexpContains
Returned expression results in True if the string value contains the regular expression pattern. -
regexpLike
Returned expression results in True if the string value matches the regular expression pattern -
regexpLike
Returned expression results in True if the string value matches the regular expression pattern -
regexpPosition
Returned expression results in the first position of the regular expression pattern within the string, or -1. -
regexpPosition
Returned expression results in the first position of the regular expression pattern within the string, or -1. -
regexpReplace
Returned expression results in a new string with occurrences of pattern replaced with repl. At most n replacements are performed. -
regexpReplace
Returned expression results in a new string with occurrences of pattern replaced with repl. At most n replacements are performed. -
regexpReplace
Returned expression results in a new string with all occurrences of pattern replaced with repl. -
regexpReplace
Returned expression results in a new string with all occurrences of pattern replaced with repl.
-