RegEx puzzle# Programming - 葵花宝典
c*t
1 楼
$s = '7/1/2007 1:20,field 2,6/9/2006 2:9,field 3,1/1/2008 12:9';
try to convert it to
'07/01/2007 01:20,field 2,06/09/2006 02:09,field 3,01/01/2008 12:09'
how to write reguler expression to replace?
$x =~ s![^01-9]?(\d)([/:]+)!0$1$2!g; # removed , and empty space
~
~
try to convert it to
'07/01/2007 01:20,field 2,06/09/2006 02:09,field 3,01/01/2008 12:09'
how to write reguler expression to replace?
$x =~ s![^01-9]?(\d)([/:]+)!0$1$2!g; # removed , and empty space
~
~