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

Many programming languages have a function for that to do that for you...

In Perl, it's called quotemeta (qw, qq and family, too), in Python and Ruby it's .escape... and there's always \Q ... \E to use...

I'm sure others have similar methods/functions.



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

Search: