Hacker News new | ask | show | jobs
by eyelidlessness 1275 days ago
> If you call your variables a, b, c, then it will be impossible to search for instances of them using a simple text editor.

My friends, it’s time we all learn regex. You’ve heard it’s unknowable, but a simple \b on either side of your target search is your friend too! It just means “there isn’t an alphanumeric character next to me!” It wants to get to know you! If you can’t search for a variable named a, it wants to help!

2 comments

If this comment ever becomes a reference for anyone at all, I’d be remiss if I don’t add that “alphanumeric” for some odd reason includes underscores.
I did unspeakable multiplication with regex this weekend to help a friend fix an ebook. Feel free to ask me how