I am trying to match the string 6c81748b9239e96e it’s random each time. Using the following code below. My problem is that it matches the entire string and I only need the random string that contains the letters and numbers.
String
<a href="playgame.aspx?gid=4&tag=6c81748b9239e96e">Play</a>
javascript regex
string.match(/\&tag\=[A-Za-z0-9]+\"\>/i);
Here is my suggestion:
Add the snippet provided by @Artem Barger to your code: https://stackoverflow.com/a/901144/851498 You need to slightly modify it, though (adding the
strargument):Use it this way:
Jsfiddle demo: http://jsfiddle.net/Ralt/u9MAv/