In years of being a developer I never really spent the time to learn regular expressions. It always seemed like a hard nut to crack.

I used to spend so much time trying to find regular expressions for my use case.
now you have two problems
Enter iHateRegex.io

I made a simple tool that will explain to you commonly used regular expressions work.
It is a simple tool that will show a visual graph as well as matches and highlighting for code.
Hope you like the tool :D
Tech
Public Repo: https://github.com/geongeorge/i-hate-regex
The application is built using:
- The awesome Nuxt.js framework
- Tailwind.css
- for the visual demo I used: https://gitlab.com/javallone/regexper-static
Update
- Thank you for all the love and support guys 💓 Posting this has given me enough motivation to work on this more.
- The application is just an MVP right now. With the support of everyone, I can make this into a great project for beginners.
- I'm also working on tutorial pages to get started on regex. here's a sample
Producthunt launch
I just launched iHateRegex on Producthunt 😺
👉👉
https://www.producthunt.com/posts/i-hate-regex

Latest comments (88)
Wow, this is great. Thanks man!
This is awesome @geongeorge ! Thank you!
Don't forget to bookmark :P
I like regex. I hate when people invent weird custom 'subsets' of regexp, instead of using this thing that works well. (albeit, I agree: it's not very readable. Free space regex with comments solves that, though.)
Regular expressions are extremely useful in (ad hoc) scripts and sometimes in search-replace operations in text editors (also for pure search to become more specific (fewer false positives)).
Typically one-off scripts to extract and output information from line-oriented input (even HTML). They don't need to be robust and are (usually) not maintained. They get the job done quickly and efficiently.
Nice job - love it!
One of the things about regexes is that they are (generally) not regular in two senses of the word:
1) they have different syntax for perl/PCRE, Python, Emacs, Vim, ...;
2) they are not regular in the linguistic/CompSci sense of the "regular languages", and even when they are, backtracking parsers are (almost always) used on them and this can lead to denial-of-service bugs :(
Yes, it was for a couple of minutes. It's back online :)
Don't know what happened
Still down/Down again for me.
Did a huge update and had some issue with ssl.
I guess it's fine now :)
Awesome!
I have been a programmer for over a quarter of a century. And I used to think that I would never "get" regular expressions. Then one day about 6 or 7 years ago I realized I could write regular expressions correct about 80% of the time, after which it occurred to me that I now "get" regex. What changed?
I started using PhpStorm (or any JetBrain's IDE) and forced myself to use regular expressions to do search and replace. Because of how their UI works — it includes a preview of the result for each occurence when it asks if okay to replace — it basically trained me to grok regex.
So, trying to learn regular expressions only when you need to use one in your code will, if you are like me, leave you forever unable to become one with regex. But if you would like to learn the 20% of regex like the back of your hand that you'll use 80% of the time, grabbing a JetBrain's IDE (or maybe some other IDEs or text editors) and forcing yourself to use regex on almost every search is really all it takes.
#jmtcw
Thanks for sharing the story Although I didn't use any special ide other than vscode, building ihateregex.io made me understand a lot of it. I can build my own expressions now.
oooohhhh, I will defintely take a look at this. I hate regex also and the visuals you are providing will definitely help me debug my expressions
Some comments may only be visible to logged-in visitors. Sign in to view all comments.