Regular expression cheat sheet
To capture, use named groups.
If you overdose, make sure not to miss the next page, which comes back down to Earth and talks about some really cool the king of fighters 98 pc games stuff: The 1001 ways to use Regex.
Also known as comment mode or whitespace mode (?x) # this is a # comment abc # write on multiple # lines d # spaces must be # in brackets abc d (?n).NET: named capture only Turns all (parentheses) into non-capture groups.
For a full reference to the particular regex flavors you'll be using, it's always best to go straight to the source.Also known as "single-line mode" because the dot treats the entire input as a single line (?s)From.*to textmate editor for windows Z From A to Z (?m) Multiline mode (except Ruby and JS) and match at the beginning and end of every line (?m)1rn2rn3 1 2 3 (?m).Makes quantifiers "lazy" d?Java, Ruby 2: character class subtraction is obtained by intersecting a class with a negated class a-z aeiou An English lowercase letter that is not a vowel.I tried to introduce features in a logical order and to keep out oddities that I've never seen in actual use, such as the "bell character".Q(C?)E (C?) The 1001 ways to use Regex Fundamentals Black Belt Program Regex in Action For awesome tricks: scroll down!Once or none plurals?Tools More Tricks Languages.S D An non-whitespace character that is a non-digit.
This is a work in progress - Questions, comments, criticism, or requests can be directed Here Copyright 2008 Peter Freitag (m All Rights Reserved.
A x41-x453 ABE (direct link) Anchor Legend Example Sample Match Start of string or start of line depending on multiline mode.