Skip to content

remram44/regex-cheatsheet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

56af21e · Dec 17, 2024

History

62 Commits
Jul 20, 2021
Apr 12, 2015
Apr 12, 2015
Dec 17, 2024
Dec 17, 2024
Apr 13, 2015
May 22, 2024

Repository files navigation

Cheatsheet for regex syntaxes

Many programs use regular expression to find & replace text. However, they tend to come with their own different flavor.

You can probably expect most modern software and programming languages to be using some variation of the Perl flavor, "PCRE"; however command-line tools (grep, less, ...) often use the POSIX flavor (sometimes with an extended variant, e.g. egrep or sed -r). ViM also comes with its own syntax (a superset of what Vi accepts).

This cheatsheet lists the respective syntax they each use.

If you spot errors or missing data, or just want to make this prettier/more accurate, don't hesitate to open an issue or a pull request.

The rendered cheatsheet is available here: regex cheatsheet

Note that this is still a work in progress; a lot of entries need some details in some kind of tooltip.