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

> s/his/her/

s/his/their



I believe you mean:

s/s\/his\/her/s\/his\/their/


s#s/his/her#s/his/their# also works and avoids awkward escaping. The first symbol after s is used as the separator. Works in vim, at least.

In other words:

s%s/s\\/his\\/her/s\\/his\\/their/%s#s/his/her#s/his/their#%


Did you just assume my regex engine is pcre gendered???


Wow, I've never heard this joke before. Original and well-applied to the situation.


    awkward escaping
Or as I've seen it called, "leaning toothpick syndrome".




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

Search: