if not in posix mode, when followed by a left or right round bracket (see ).Note that \r and \n are never matched because in Scintilla, regular expression searches are made line per line (stripped of end-of-line chars). \a, \b, \f, \n, \r, \t, \v match the corresponding C escape char, respectively BEL, BS, FF, LF, CR, TAB and VT.\ matches the character following it, except: char matches itself, unless it is a special character (metachar). If set to 1, syntax uses the more common style where ( and ) mark capturing sections while \( and \) are plain parentheses. If set to 0, syntax uses the old Unix style where \( and \) mark capturing sections while ( and ) are themselves. Regular expression syntax depends on a parameter: For example, pairs of numbers separated by a ',' could be reordered by replacing the regular expression: Replacement with regular expressions allows complex transformations with the use of tagged expressions. For example, it is possible to search for variables in SciTE property files, which look like $(name.subname) with the regular expression: Regular expressions can be used for searching for patterns rather than literals. Hyphens at other positions in character classes where they can’t form a range may be interpreted as literals or as errors. This works in all flavors discussed in this tutorial. and match any character that is not an x or a hyphen. The hyphen can be included right after the opening bracket, or right before the closing bracket, or right after the negating caret. In fact most regex variants has the same rule for matching hyphen If a bracket expression specifies both '-' and ']', the ']' shall be placed first (after the '^', if any) and the '-' last within the bracket expression.
To use a as the starting range point, it shall either come first in the bracket expression or be specified as a collating symbol for example, "-0]", which matches either a or any character or collating element that collates between and 0, inclusive.
As examples, the expressions "" and "" are equivalent and match any of the characters 'a', 'c', or '-' "" and "" are equivalent and match any characters except 'a', 'c', or '-' the expression "" matches any of the characters between '%' and '-' inclusive the expression matches any of the characters between '-' and inclusive and the expression is either invalid or equivalent to because the letter 'a' follows the symbol '-' in the POSIX locale. The character shall be treated as itself if it occurs first (after an initial '^', if any) or last in the list, or as an ending range point in a range expression. To include a ‘-’, write ‘-’ as the first or last character of the set, or put it after a range.
Posix regular expression not match manual#
To include a hyphen in a character class it must be at the first or last positionįrom find manual "the type of regular expression used by find and locate is almost identical to that used in GNU Emacs" and from Emacs manual: