Feed Sign in with OpenID OpenID

Simon Willison’s Weblog

1 item tagged “escaping”

Escaping regular expression characters in JavaScript

JavaScript’s support for regular expressions is generally pretty good, but there is one notable omission: an escaping mechanism for literal strings. Say for example you need to create a regular expression that removes a specific string from the end of a string. If you know the string you want to remove when you write the script this is easy: [... 362 words]

A django site