Re:Show HN: Regex Cheatsheet
by useragent86 on Friday January 31, 2020 @11:46PM
(#22208732)
IME Emacs provides a very pleasant way to write regexps using the rx library. ELPA also has the package xr, which converts Elisp regexps to rx format, and pcre2el converts PCRE to Elisp. So a regexp like
Can easily be converted like:
To:
[ Parent
| on HN ]
Re:Show HN: Regex Cheatsheet
by alexhutcheson on Saturday February 01, 2020 @01:15PM
(#22212088)
Agreed that rx is nice, but really only useful if you're writing elisp. 90%+ of people who need to interact with Emacs regexps aren't writing an elisp program - they're using Emacs interactively, or even using another program (busybox, GNU find, etc.) that uses Emacs regexps for historical reasons. For those people the differences in syntax between Emacs regexps and "normal" regex dialects are a pain.