in reply to simple replace question

Rather then capturing the tags I would capture the content:

$testtext =~ s|^<p>(.*?)</p>$|$1|;

Replies are listed 'Best First'.
Re^2: simple replace question
by jck (Scribe) on Jul 09, 2009 at 23:21 UTC
    morgon,

    this looks like the best suggestion!! given the greediness of grep, this approach would ignore any internal <p> tags? that's what i want - just to strip off the first and last tag.

    thanks -
    janaki