http://www.perlmonks.org?node_id=582857


in reply to search and replace confusion

Your input contains:

<!-monthstart--><option value="01">January </option>\n

Your substitution looks for:

s/<!--monthstart-->.*<!--monthend-->/MONTHS<br>\n/s;

Spot the discrepancy :)

--
<http://dave.org.uk>

"The first rule of Perl club is you do not talk about Perl club."
-- Chip Salzenberg

Replies are listed 'Best First'.
Re^2: search and replace confusion
by jonnyfolk (Vicar) on Nov 08, 2006 at 12:07 UTC
    Aah, thanks very much. More embarrassing is the amount of time I've spent staring at it trying to find my mistake!! :)