Reputation: 4342
can somebody help me converting this
preg_match('/^(.*?)[#,\.0]+(.*?)$/',$patterns[0],$matches)
into Javascript equivalent? I tried doing
matches = patterns[0].match('/^(.*?)[#,\.0]+(.*?)$/')
but this results in null...
Upvotes: 1
Views: 3815
Reputation: 21911
Remove the quotes from the regex
matches = patterns[0].match(/^(.*?)[#,\.0]+(.*?)$/);
Upvotes: 8