Using javascript, can someone please help me with a pattern to match something in this string:
div style="display: none" key="ABC\jones" displaytext="Tom Jones"
My goal is to extract the value for key, in this case: ABC\jones
So, everything between
key="
and
"
Thanks for the help!!
something like:
should match
the tailing
"is for completeness so that it matcheskey="..."and not justkey="...As for how this is working, the normal characters are them selves, the
[^"]defines a match group of all characters that are not"( the^being not ). So this will match everything after akey="until it collides with a". The( )capture the matched values for later recall.