in reply to Re: commenting regular expressions?
in thread commenting regular expressions?
#!/usr/bin/perl my $s = "blah,blah,blah <PgfTag `Normal \(T\)'> yadda,yadda,yadda"; print "s =\t\"$s\"\n"; my $pattern = qr{ \s* <PgfTag `Normal \(T\)'> \s* }; my $k = 0; $s =~ s/$pattern/++$k && ','/gex; print "$k change(s)\n"; print "s =\t\"$s\"\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: commenting regular expressions?
by Anonymous Monk on Sep 04, 2003 at 18:22 UTC | |
by SeekerOKnowledge (Initiate) on Sep 04, 2003 at 18:28 UTC |