Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you write and test your regular expressions?

Is their any wizards or tools to create and test regular expressions for PHP, because it is so difficult :( ? thanks :)

like image 458
ahmed Avatar asked Dec 06 '25 04:12

ahmed


2 Answers

RegexBuddy is a widely popular app for this purpose. It also costs $40 and only runs on Windows.

For powerful free alternatives, see this answer.

like image 178
David Hanak Avatar answered Dec 07 '25 19:12

David Hanak


reAnimator is a nice tool to visualize your regex as a state machine- I find it useful sometimes.

Python also allows you to view a regex parse tree, which can be helpful if you learn to read it.

like image 25
Kenan Banks Avatar answered Dec 07 '25 19:12

Kenan Banks



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!