I'm trying to test if the /
character is inside double quotes within a JavaScript string. For instance, "hello/world"
will match, whereas hello/world/"How are you"
will fail because it's outside of the double quotes. I've been looking around and haven't found an answer to this.
Also, "hello"world/how"are you"
should fail as the opening and closing double quotes do not encapsulate the /
, as determined from left to right. To reiterate, I want to match all instances within/inside/in between closing and opening double quotes, which is unlike Alternative to regex: match all instances not inside quotes