I need to match on a string such as this:
\'if Country equals \"United States\" then Show\'
I\'m working with the Webforms for Marketers Module
Just use "; no need to escape it.
Also, you're apparently trying to match the " without first matching the equals, so it won't match any of your test cases.
equals
/^if\s+(\d*|\w*)\s+".*$/.test("if abc \"xyz\"") // ==> true /^if\s+(\d*|\w*)\s+".*$/.test("if abc equals \"xyz\"") // ==> false