Can someone maybe help me with this regex? I am using Javascript and classic ASP.
checkxls = checkxls.match(/'.*?', '.*?', '.*?', '.*?', '.*?', '.*?', '.*?', '.*?', '.*?', '.*?', '.*?', '.*?', '.*?', '.*?';/ig)
I need to match this pattern exactly.
I am looking for a more elegant way of doing this.
You can use a negative character class to avoid unnecessary backtracking:
/'[^']*'(?:, '[^']*'){13};/g
You can also drop the case-insensitive flags since there are no letters in your regular expression. This might give a small performance improvement.
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