in reply to Adding <pre> at beginning </pre> at file end
This is actually not a good time for regular expressions, though you could certainly use them. Assuming the entire text is in a single string, might I recommend the concatenation operator?
If you really want to use a regular expression, a substitution using the $ and ^ metacharacters as well as the s modifier will work. Give perlre a read through.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Adding <pre> at beginning </pre> at file end
by targetsmart (Curate) on Apr 07, 2009 at 14:53 UTC |