help to build a regex to replace
Posted: Fri Jul 11, 2014 4:36 am
hi people
I'm new with regex in php and need help to build a regex
from a string like
xx_yy_zz_ww.php
I should get a string like
xx_yy_hh_ww.php
the components of the string are separated by underscores
hh xx yy zz are numbers and they have at least one digit, while ww is a text, a file name
so I should replace zz with hh, zz is the number in 3th position from left
thanks for helping me
I'm new with regex in php and need help to build a regex
from a string like
xx_yy_zz_ww.php
I should get a string like
xx_yy_hh_ww.php
the components of the string are separated by underscores
hh xx yy zz are numbers and they have at least one digit, while ww is a text, a file name
so I should replace zz with hh, zz is the number in 3th position from left
thanks for helping me