14
rated 0 times
[
18]
[
4]
/ answers: 1 / hits: 19379
/ 10 Years ago, wed, september 3, 2014, 12:00:00
I need to dynamically create a regex to use in match function javascript.
How would that be possible?
var p = *|;
var s = |*;
*|1387461375|* hello *|sfa|* *|3135145|* test.match(/p(d{3,})s/g)
this would be the right regex: /*|(d{3,})|*/g
even if I add backslashes to p and s it doesn't work. Is it possible?
More From » regex