Examples of using Regexp in English and their translations into Chinese
{-}
-
Political
-
Ecclesiastic
-
Programming
As shown in the syntax description, a regular expression's exec method can be called either directly,(with regexp. exec(str)) or indirectly(with regexp(str)).
The REGEXP operator is more powerful.
LIKE, REGEXP, and SIMILAR TO: differences in character comparisons.
The underscore is not considered a metacharacter for REGEXP and REGEXP_SUBSTR.
REGEXP expressions are never optimized.
Also, REGEXP and SIMILAR TO have a different default escape character.
When performing comparisons, REGEXP behavior is different from LIKE and SIMILAR TO.
LIKE, REGEXP, and SIMILAR TO: Differences in pattern definition.
LIKE, REGEXP, and SIMILAR TO: Differences in pattern definition.
REGEXP behavior matches closely with Perl 5(except where Perl syntax and operators are not supported).
The REGEXP search condition and the REGEXP_SUBSTR function support all the syntax conventions in the table below, but the SIMILAR TO search expression does not.
Differences in matching Since REGEXP uses code point values, it only matches a literal in a pattern if it is the exact same character.
For REGEXP comparisons, the database server uses code point values in the database character set for comparisons.
REGEXP and REGEXP_SUBSTR When the caret is the first character in a character class, it matches anything other than the characters in the character set.
REGEXP, LIKE, and SIMILAR TO search conditions differ in how you define pattern.
In addition, for compatibility with other products, the REGEXP search condition supports several syntax extensions.
When used with REGEXP and REGEXP_SUBSTR, matches the end of a string.
The REGEXP, LIKE, and SIMILAR TO search conditions are similar in that they all attempt to match a pattern to a string.
To demonstrate how extended regular expressions work, the LIKE queries shown previously are rewritten here to use REGEXP.
Whether the regular expression is being used with the SIMILAR TO or REGEXP search conditions, or the REGEXP_SUBSTR function.