Skip to content

Instantly share code, notes, and snippets.

@dlobue
Created January 8, 2015 22:21
Show Gist options
  • Save dlobue/9560412b4e6c00c5f230 to your computer and use it in GitHub Desktop.
Save dlobue/9560412b4e6c00c5f230 to your computer and use it in GitHub Desktop.
regex rosetta stone
sed:
grouping- \( \)
backreference- \1 \2 \3
low,high- {x,y}
one or more- \+
or- \|
class match- [abc123]
eol- $
awk:
grouping- ( )
backreference- \\1 \\2 \\3
low,high- {x,y}
one or more- +
or- |
class match- [abc123]
eol- $
vim:
grouping- \( \)
backreference- \1 \2 \3
low,high- \{x,y}
one or more- \+
zero or more- *
any char- .
or- \|
class match- [abc123]
eol- $
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment