@InterfaceStability.Experimental @InterfaceAudience.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.
Constructor and Description |
---|
PatternMatchingFunctions() |
Modifier and Type | Method and 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 pattern
|
static Expression |
regexpLike(String expression,
String pattern)
Returned expression results in True if the string value matches the regular expression pattern
|
static 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.
|
public static Expression regexpContains(Expression expression, String pattern)
Returned expression results in True if the string value contains the regular expression pattern.
public static Expression regexpContains(String expression, String pattern)
Returned expression results in True if the string value contains the regular expression pattern.
public static Expression regexpLike(Expression expression, String pattern)
Returned expression results in True if the string value matches the regular expression pattern
public static Expression regexpLike(String expression, String pattern)
Returned expression results in True if the string value matches the regular expression pattern
public static Expression regexpPosition(Expression expression, String pattern)
Returned expression results in the first position of the regular expression pattern within the string, or -1.
public static Expression regexpPosition(String expression, String pattern)
Returned expression results in the first position of the regular expression pattern within the string, or -1.
public 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. At most n replacements are performed.
public 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. At most n replacements are performed.
public static Expression regexpReplace(Expression expression, String pattern, String repl)
Returned expression results in a new string with all occurrences of pattern replaced with repl.
public static Expression regexpReplace(String expression, String pattern, String repl)
Returned expression results in a new string with all occurrences of pattern replaced with repl.
Copyright © 2015 Couchbase, Inc.