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

Most other programmers probably find your code incomprehensible, if it was Perl :^)

But seriously, is there any modern language other than Perl where regular expressions feel so… natural? I reach out for Perl less and less, but always sigh when I need to handle any regex in Python.



Closest thing would probably be JS, which has regex literals (and you can just call methods on them, or pass them in places).

Example: /.*a.*/.test("this is a string") // returns true


Ruby?




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

Search: