

Matches regular expression, case insensitive Matches regular expression, case sensitive SUBSTRING('foobar' FROM '#"o_b#"%' FOR '#') NULL The portion of the pattern between these markers is Must contain two occurrences of the escape character followed Should be returned on success, SQL99 specifies that the pattern Must match to the entire data string, else the function failsĪnd returns null. Substring that matches a SQL99 regular expression pattern. Three parameters, SUBSTRING( string FROM pattern FOR escape), provides extraction of a Specifies a character class, just as in POSIX regularĭisables the special meaning of any of these metacharacters orĪ different escape character can be specified with ESCAPE. TO supports these pattern-matching metacharacters In addition to these facilities borrowed from LIKE, SIMILAR TO uses % and _ as wildcard characters denoting any string andĪny single character, respectively (these are comparable to Regular expression practice, wherein the pattern may match any Pattern matches the entire string this is unlike common Like LIKE, the SIMILAR TO operator succeeds only if its SQL99's regular expressions are a curious It is much like LIKE, except that it interprets the patternĪ regular expression. Returns true or false depending on whether its pattern matches There are also !~~ and !~~* operatorsĮxpressions string SIMILAR TO pattern Insensitive according to the active locale. Special meaning of underscore and percent signs in the The escape mechanism, which makes it impossible to turn off the It's also possible to select no escape character by writing Special to the string literal parser, so you still need two of You can avoid thisīy selecting a different escape character with ESCAPE then backslash is not special to Means writing four backslashes in the query. Writing a pattern that actually matches a literal backslash String literals, so to write a pattern constant that contains aīackslash you must write two backslashes in the query. Note that the backslash already has a special meaning in The default escape character is the backslashīut a different one may be selected by using the ESCAPE clause. Matching other characters, the respective character inĮscape character. To match a literal underscore or percent sign without String, the pattern must therefore start and end with a percent Underscore ( _) in pattern stands for (matches) any singleĬover the entire string. The string itself in that case LIKE acts like the equals operator. Percent signs or underscore, then the pattern only represents (As expected, the NOT LIKE expression returns false if String NOT LIKE pattern Ĭontained in the set of strings represented by pattern.
