in reply to Find/Chng every <any>

if you have a string <a>b<c>, then the .* matches a>b<c, not just a. If you want avoid that, use [^<>]* instead of .*.

See also: perlretut, perlre.

Perl 6 - links to (nearly) everything that is Perl 6.

Replies are listed 'Best First'.
Re^2: Find/Chng every <any>
by nvivek (Vicar) on Sep 04, 2010 at 03:56 UTC

    It should be [^<>]+ not [^<>]* because * means 0 or more occurrence of previous character in regular expression of Perl.

      Unless, of course, "any text" can include an empty string.