Vladimir Lugovsky

Regex library - A curated list of most commonly used regular expressions

A curated list of most commonly used regular expressions with code examples in different programming languages: JavaScript, Python, Java, C#, and PHP.

Add a comment

Replies

Best
Vladimir Lugovsky
Hi PH community! For me, it was always a pain when I have to deal with regular expressions. Yes, there is enough information on the internet and great resources like Regex101, but in the end, it was always hard for me to choose among all the wide variety of options. Besides that, since I often write code in different languages, it was always a problem to remember APIs and syntax differences of regexes for each particular language. That's why I started to collect internally the list of commonly used regular expressions with code examples in different programming languages. Since that list got pretty decent, we thought why not share it with the community. We hope that some of you might find it useful, bookmark it and get back to it when you need to validate or extract something from the text. Let us know if there are some additional regular expressions that you think we need to include in that list!
Yakubu Yusuf Tambaya
@vladimir_lugovsky This is wonderful I love it. I'm building similar product but focusing on JavaScript only. Congrats on your launch
Vladimir Lugovsky
@yytambaya Thank you!
Steve Mann
This is gonna be so useful! @sagarika_singh @sanveer_osahan @nidhi_shah10 you might wanna have a look. Good work @vladimir_lugovsky!
Ste
Haha just remembered how much I hate regex. This resource is great, I made it a point to not learn the formulas by heart so this will come in handy.
Vladimir Lugovsky
@stelian_dobrescu1 Same here. I hated them, but then just started collecting.
Sarthak Solanki
From every developer of the world, thank you! Very usefull!
Manveer Singh Rayat
Thank you for creating a library like this. Will be very helpful. Congrats on the launch.
Alessandro Oliveri
Very useful reference thank you!
Vladimir Lugovsky
@alessandro_oliveri1 Thank you for your support!
Rosie Higgins
regex resources are always useful. Thanks for sharing!
Vladimir Lugovsky
@rosie_higgins_grapevine That's the point! 🙌
Tomas Antonok
Very useful resource for a daily coder's work. Thank you very much!
Marco Colli
Where is Ruby?
Vladimir Lugovsky
@collimarco We decided to only add languages we have experience with. But if anyone from Ruby community would like to contribute, we are happy to add it.
Michael Truong
This is also a great way to learn regex. Thanks and congrats.
Patrick Shanley
Congrats on launching! Its great to see more resources available for getting a regex right the first time.
Jaga Deep
great resource!! congrats! I was looking for domain name validation (validates only example.com, or with subdomain sub.example.com) regex in your list.
Alexander Friz
Nice and simple! I like it! Thank you!
Carsten Pleiser
This looks extremely useful, also for marketers. Good luck.
Suwayne Bruce
Very useful product. Thanks for launching this.