My favorite regex of all time - good coders code, great reuse |
| Posted: 12 Nov 2012 02:36 PM PST I thought I'd share my favorite regex of all time: [ -~] Any ideas what this regexp matches? It matches all ASCII characters from the space to the tilde. What are those characters? They're all printable characters! Take a look at the ASCII table. The printable characters start at the space and end at the tilde:
I love this. Update: Would you like to wear this regular expression? I just had an idea to make it a t-shirt as this blog post is getting so popular. Check out this t-shirt that I made: This shirt is available through Teespring. Teespring is like Kickstarter for t-shirts. If 50 people buy the shirt, everyone gets their shirt. Otherwise no one gets charged and no one gets the shirt. |
| You are subscribed to email updates from good coders code, great reuse To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
| Google Inc., 20 West Kinzie, Chicago IL USA 60610 | |
No comments:
Post a Comment
Keep a civil tongue.