skip to Main Content

regex matches in php, but not in javascript

I have the folowing text 00:00:01.000 --> 00:00:02.000 ALFRED, NOČNI ČUVAJ and with this regex: /(\d{2}):(\d{2}):(\d{2})\.(\d{3})/ and a bit of code: <?php $line = "00:00:01.000 --> 00:00:02.000rnALFRED, NOČNI ČUVAJ"; $pattern1 = '(d{2}):(d{2}):(d{2}).(d{3})'; $m1 = preg_match("/^$pattern1/", $line); if (is_numeric($m1) && $m1…

VIEW QUESTION

regex non-fixed-width lookaround – PHP

I am trying to match curly quotes that are inside shortcodes and replace them with normal quotes but leave the ones outside. Here is an example content: “foobar” [tagname id=“1035” linked=“true”] “another” [tagname id=“1”] Should output the following: “foobar” [tagname…

VIEW QUESTION
Back To Top
Search