Wednesday, 21 August 2013

Explain the regex in perl? [on hold]

Explain the regex in perl? [on hold]

Following lines are the code snippet in Perl, can any one explain me the
regex in the below lines so that I can convert them into Java?
$line =~ s/\(s\)//g if $line =~ m/[a-z]\(s\)/;
$line =~ s/s\)/)/g if $line =~ m/[A-Z]s\)/;
$line =~ s/\@//g;
$line =~ s/ \/ /\//g;
$line =~ s/^\s+//g;
$line =~ s/\s+$//g;
$line =~ s/\s+/ /g;
Thanks

No comments:

Post a Comment