Skip to content

Instantly share code, notes, and snippets.

@anildigital
Created December 13, 2008 16:08
Show Gist options
  • Save anildigital/35488 to your computer and use it in GitHub Desktop.
Save anildigital/35488 to your computer and use it in GitHub Desktop.
List of helpful regular expressions (Emacs specific)
. any character (but newline)
* previous character or group repeated (0 or more time)
+ previous character or group repeated (1 or more time)
? previous charater or group repeated (0 or 1 time)
^ start of line
$ end of line
[...] any character between brackets
[^..] any character not between brackets
[a-z] any character between a to Z
\ prevents interpretation of following special character
\| or
\w word constituent [still not understood]
\b word boundary [still not understood]
\sc character with c syntax (e.g. \s- for whitespace char) [still not understood]
\( \) start\end of group [still not understood]
\< \> start\end of word [still not understood]
\` \' start\end of buffer [still not understood]
\1 string matched by the first group [still not understood]
\n string matched by the nth group [still not understood]
\{3\} previous character or group, repeated 3 times [still not understood]
\{3,\} previous character or group, repeated 3 or more times [still not understood]
\{3,6\} previous character or group, repeated 3 to 6 times [still not understood]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment