I need to match a javascript string, with a regular expression, that is a string enclosed by single quote and can only contain a backslashed single quote.
The exampl
Try this
/^'([a-z]*(?:\')?[a-z])+'$/
See example here
str = 'abc\'de\'fg'; match = str.match(/^([a-z\\']+)$/g);
Tested in Firebug console. Works with or without the escape chars.