i am using a regular expression: pattern=/([a-zA-Z0-9_\.].*?)=(.*?);/g;
which has more than one match in the text i use. Now i want the content which is after "=" . I used RegExp.$2
but it gives only one value. Please help me for getting the value after "=" in all matches available.
You have to iterate through matches in a while loop:
var match = null;
while (match = pattern.exec(script_txt)) {
// Do something with match[2]
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With