Regex syntax

From vegard.wiki
Revision as of 13:31, 18 April 2020 by Vegard (talk | contribs) (update table)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
This article is currently a stub; it means I'm aware it's short and I probably intend to expand on the subject in the future!

I can never remember which programs use which regex variants, so here's a quick recap sheet.

grep (GNU) sed (GNU) vim python
capture \( ... \) \( ... \) \( ... \) ( ... )
option \| \| \| |
word boundary \< or \> \< or \> \< or \> \b
zero or more * * * *
one or more \+ \+ \+ +