Regular expressions

Here are the most important regular expressions you can use in the filter, search dialog and in the command line arguments for external tools. There are some more, but the author is too lazy to copy them all from the Microsoft MSDN pages (and probably it may be illegal). On the end of the page there's a link to the original regular expression documentation for .NET.

Character classes

[char_group ]

Any char of the group. E.g. [abc] will find a, b or c.

[^ char_group] 

A char not contained in the group. [^abc] will find all but a, b or c


Chars contained in the range. [a-z] will find all lowercase letters.


Any char but \n. Note: a . in a character group ([.]) is a literal, not a placeholder for 'any char'.


same as [a-zA-Z_0-9]


same as [^a-zA-Z_0-9]




No Space


Decimal digit


No decimal digit



Zero or more matches


One or more matches


Zero or one matches


Exactly n matches


At least n matches


n to m matches


First match that consumes as few repeats as possible


As few repeats as possible, but at least one


Zero repeats if possible, or one





Carriage return


New line


ASCII char in hex notation (2 digits)


Use \ to escape the following character. For example \*


When in [] it's a backspace char. Otherwise a word boundary.


( subexpression )

Captures the matched subexpression. Captures using () are numbered automatically based on the order of the opening parenthesis, starting from one. The first capture, capture element number zero, is the text matched by the whole regular expression pattern.


Substitutions are used in replacement patterns.


Substitutes the last substring matched by group number number (decimal).


Substitutes a $ literal.


Substitutes the match itself.


Substitutes all the text of the input string before the match.


Substitutes all the text of the input string after the match.


Substitutes the last group captured.


Substitutes the entire input string.


The complete documentation of all RegEx options for .NET can be found on the Microsoft MSDN pages: