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
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!
This is wonderful I love it. I'm building similar product but focusing on JavaScript only. Congrats on your launch
this is really useful. I don't know anybody who is mastering this ๐Ÿ˜„
Thank you!
Dude, I would have loved this for my web app. Thanks for sharing.
This is gonna be so useful! you might wanna have a look. Good work !
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.
Same here. I hated them, but then just started collecting.
From every developer of the world, thank you! Very usefull!
Thank you for creating a library like this. Will be very helpful. Congrats on the launch.
Very useful reference thank you!
Thank you for your support!
regex resources are always useful. Thanks for sharing!
That's the point! ๐Ÿ™Œ
Very useful resource for a daily coder's work. Thank you very much!
Thank you!
AWESOMEโœจ
Thank you!
Where is Ruby?
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.
12
Next
Last