I use regex in PHP. This is my script:
$s="2044 blablabla 2033 blablabla 2088"; echo preg_replace("/(20)\d\d/","$1 14",$s);
The result was like this:
20 14 blablabla 20 14 blablabla 20 14
I want to remove the space between 20 and 14 to get the result of 2014 . How to do it?
php regex preg-replace preg-match
ro0xandr
source share