how to extract this string using regular expression
||03/15/2012||10:17:11|FOR TEST
I want to extract “03/15/2012” . I have tried this command
my $firstLine =~ m/^\|\|\d{2}\/\d{2}\/\d{4}\|\|/i ;
trace("first line extraction : $firstLine first $1");
It doesn’t work. could you please help ?
thanks
You need to use a capturing group
()around the part you want to extract: