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...
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...
Share Improve this question asked Jun 8, 2012 at 11:38 ragulkaragulka 4,3527 gold badges49 silver badges74 bronze badges1 Answer
Reset to default 8Remove the quotes from the regex
matches = patterns[0].match(/^(.*?)[#,\.0]+(.*?)$/);