I have the text:
s.events=\"event3\" s.pageName=\"Forum: Index\" s.channel=\"forum\" s.prop1=\"Forum: Index\" s.prop2=\"Index Page\" s.prop36=\"\" s.prop37=\"\"
Can't comment on above answer, but I think the regex is better with .* like so:
var myregex = /s\.prop42="(.*)"/; var matchArray = myregex.exec(yourString); if (matchArray != null) { thematch = matchArray[1]; }