Regular expression cheatsheet

Log in to Vote
68
68 Votes • 6 Comments
Could also be Fathead but is probably best as a chart-type Goodie (see ASCII Codes) because of the generally limited set of special characters in most regular expression grammars.

A regex cheat sheet containing some information from here: http://www.cheatography.com/davechild/ch...

Possibly have the option to specify a character in the query and just show the info for that character.
• posted 6 years and 1 month ago • type: Goodie (Perl functions) Live

anonymous
So, you think someone might type in a character and the box would display the info for that character? or were you thinking something more than that - perhaps parsing and "explaining" the entire regex? with examples of matches?

And what about different flavors of regex?

I'm interested in this one, just wondering what a good first step might be.
posted by [UserVoice Bill Soistmann] • 6 years and 1 month ago Link
anonymous
gotcha, thanx
posted by [UserVoice Bill Soistmann] • 6 years and 1 month ago Link
anonymous
Also would be nice to have info for multiple regex flavors (Perl, Java, Ruby, PHP, Vim, ...)

I switch between Perl, Ruby, vim, and sed so much, I can never remember which characters I have to escape and when!
posted by [UserVoice Larry Gilbert] • 6 years and 13 days ago Link
anonymous
For extra credit, allow for comparing two or more flavors side-by-side. Kind of like having a foreign-language phrase book. :-)
posted by [UserVoice Larry Gilbert] • 6 years and 13 days ago Link
yegg
We do some evaluation of regexp now, e.g. https://duckduckgo.com/?q=regexp+%2F%28....

What I was thinking was more like

https://duckduckgo.com/?q=html+chars

Where you define all the regex symbols with some explanations, e.g. I always forget the zero-width modifier syntax.
posted by yegg Staff6 years and 1 month ago Link
Jag
Huzzah! This has been released! We blogged about it, too: https://duck.co/blog/new-instant-answers
posted by Jag Staff4 years and 5 months ago Link