In Oracle, the REGEXP_COUNT()
function returns the number of times a pattern occurs in a source string.
Tag: regex
REGEXP_SUBSTR() Function in Oracle
In Oracle, the REGEXP_SUBSTR()
function returns a substring from a string, based on a regular expression pattern.
It extends the functionality of the SUBSTR()
function by allowing us to use regular expression patterns.
REGEXP_REPLACE() Function in Oracle
In Oracle, the REGEXP_REPLACE()
function replaces occurrences of the substring within a string that matches the given regular expression pattern.
It extends the functionality of the REPLACE()
function by allowing us to use regular expression patterns.
REGEXP_INSTR() Function in Oracle
In Oracle, the REGEXP_INSTR()
function searches a string for a regular expression pattern. It returns an integer indicating the beginning or ending position of the matched substring (whichever one you specify).
It extends the functionality of the INSTR()
function by allowing us to use regular expression patterns.
How REGEXP_REPLACE() Works in MariaDB
In MariaDB, the REGEXP_REPLACE()
function replaces occurrences of the substring within a string that matches the given regular expression pattern.
The whole string is returned along with the replacements.
If there’s no match (i.e. the input string doesn’t contain the substring), the the whole string is returned unchanged.
Continue readingHow REGEXP_SUBSTR() Works in MariaDB
In MariaDB, the REGEXP_SUBSTR()
function returns the substring that matches the given regular expression pattern.
If there’s no match (i.e. the input string doesn’t contain the substring), the result is an empty string.
Continue readingHow REGEXP_INSTR() Works in MariaDB
In MariaDB, the REGEXP_INSTR()
function returns the starting index of a substring that matches the regular expression pattern.
The index starts at 1
. If there’s no match, the result is 0
.
How NOT RLIKE Works in MariaDB
In MariaDB, NOT RLIKE
is a negation of the RLIKE
operator.
In other words, any time the RLIKE
operator would return 1
, NOT RLIKE
will return 0
.
How RLIKE Works in MariaDB
In MariaDB, the RLIKE
operator is used to determine whether or not a string matches a regular expression. It’s a synonym for REGEXP
.
If the string matches the regular expression provided, the result is 1
, otherwise it’s 0
.
How NOT REGEXP Works in MariaDB
In MariaDB, the NOT REGEXP
operator is a negation of the REGEXP
operator.
If the string matches the regular expression provided, the result is 0
, otherwise it’s 1
. This is the opposite result to what the REGEXP
would return (when it isn’t prefixed with NOT
).