
Regular Expressions supports tagged expressions. Match Printable character (graphical characters and spaces) Match a punctuation character: Graphical character: For example, [ would be interpreted as [ and not as the start of a character set. This allows you to use a character x that would otherwise have a special meaning. This matches the end of a word using Scintilla's definition of words. '\Be\B+' - finds the letter 'e' only when it is in the middle of a word '\bW\w+' - finds words that begin with a 'W' Use ] when you need to avoid matching to a newline character. ) for example.Ĭomment - contents of the parentheses are ignored during matching. Similar to '(A+)\s\1' but uses names rather than group number. Assign a name to a group for later use: '(?P A+)\s(?P=first)' will find 'Apple Apple'. '(.*)(?=ton)' given 'Appleton' will match 'Apple'. Non-capture group - Look ahead assertion. Accessable though \1 for the first group, \2 for the second and so on. Normally '' will match the whole string ' content' - but '' will match ' ' and ''.Ī capture group. Non-greedy matches - matches the first valid match. For example, 'Sam' is the same as 'Saa+m' For example, Sa+m matches Sam, Saam, Saaam and so on.

For example, Sa*m matches Sm, Sam, Saam, Saaam and so on. This matches the start of a line (unless used inside a set, see above). For example, means any character except an alphabetic character.

The complement of the characters in the set. You can also use ranges, for example for any lower case character. This indicates a set of characters, for example, means any of the characters a, b or c. Note: As only 9 regions can be used you can safely use replace string \10\2 to produce "text from region 1"0"text from region 2". For example, if the search string was Fred()XXX and the replace string was Sam\1YYY, when applied to Fred2XXX this would generate Sam2YYY. This refers to the first through ninth (\1 to \9) tagged region when replacing. These tags can be used within the current regular expression or in the replacement string in a search/replace. These tag can be access using the syntax \1 for the first tag, \2 for the second, and \3 \4.

To match all characters including new lines you can use \s\S. Note: That this means "." will also match \r which might cause some confusion when you are editing a file with both \r and \n.

Matches any character except new line (\n). Note: Multi-line expressions (involving \n, \r, etc) are not yet supported. Regular Expressions allow complicated and flexible search/replace using a specific syntax. _NOTE: For older versions of PN the tagged expressions start \( and end \) and there are no non-capture groups nor the backslash groups.
