in reply to Regular Expressions
But yeah, if if this isn't just a one-time quick & dirty thing, or if you need this kind of thing for other tags, definitely go with tlm's suggestion of HTML::Parser (the example of finding the <title> tag might be a good starting ppoint, depending on what your needs are) or similar..$string =~ s/(<body\s.*?>)/$1$newContent/is;
|
|---|