GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||
GeezerVison is showing docs.voltactivedata.com — REGEXP_POSITION() Using VoltDBREGEXP_POSITION()REGEXP_POSITION() — Returns the starting position of a regular expression within a text string. SynopsisREGEXP_POSITION( string, pattern [, flag] ) DescriptionThe REGEXP_POSITION() function returns the starting position of the first instance of the specified regular expression within a text string. The position value starts at one (1) for the first position in the string and the functions returns zero (0) if the regular expression is not found. The first argument to the function is the VARCHAR character string to be searched. The second argument is the regular expression pattern to look for. The third argument is an optional flag that specifies whether the search is case sensitive or not. The flag must be single character VARCHAR with one of the following values:
There are several different formats for regular expressions. The REGEXP_POSITION() uses the revised Perl compatible regular expression (PCRE2) syntax, which is described in detail on the PCRE website. ExamplesThe following example uses the REGEXP_POSITION() to filter all records where the column description matches a specific pattern. The examples uses the optional flag argument to make the pattern match text regardless of case. SELECT incident, description FROM securityLog
WHERE REGEXP_POSITION(description,
'host:\s*10\.186\.[0-9]+\.[0-9]+',
'i') > 0
ORDER BY incident; | ||||||
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |