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

If multiple things use the same regex, which one should it be close to? Or do you propose duplicating it?


My go-to is actually wrapping it in a lambda. The reason being you get nice syntax highlighting you don’t get with string literals! (In PHPStorm the string part of preg_match gets regex highlighting)




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

Search: