What I would like to do is reformat & comment these regex's more in the style discussed in perlfaq6. Yet when I break the qr// statement up into multiple lines, I no longer match correctly. Is there a way to do this?my $pattern = qr{<PgfTag `Normal \(T\)'>\s*\n\s*<ParaLine\s*\n\s*<Stri +ng `$oldLabel'>\s*\n}; my $replacement = "<PgfTag `Block Label \(T\)'>\n<ParaLine\n<String `$ +newLabel'>\n"; my $k = 0; $$contents =~ s/$pattern/++$k && $replacement/ge;
In reply to commenting regular expressions? by SeekerOKnowledge
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |