Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

How to become a regular expression wizard:

1. Write a bunch of regular expressions.

2. Fix them when they break.

Anybody can do this, however junior they may be. (And yes, it does grant you a superpower.)



3. Write tests.

Don't change your existing regular expressions without tests, or Bad Stuff happens.


I don't usually write regular expressions that are complex enough to need maintenance. If you are writing one that is enough effort that it isn't disposable, then you might want to reconsider whether you're using the right tool.


Assuredly, like most/anything in life, repetition and dedication will be your regex salvation.

Tools such as this are shortcuts for newcomers to grok the various operators rapidly. I think they are very worthwhile.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: