in reply to Re: Search and replace in html
in thread Search and replace in html

LameNerd,
Try your code with:
__DATA__ asdfasdf asdfasdf asdfasdf<htMl >asdfasdf blah </htmlasdf> foo bar </html >asdfasdf asdfasdf
I am not saying that Anonymous Monk should even be attempting to do this as a roll your own solution (go CPAN) - just thought I would point out a weakness or two.

Cheers - L~R

Replies are listed 'Best First'.
Re: Re: Re: Search and replace in html
by LameNerd (Hermit) on May 09, 2003 at 03:48 UTC
    The output is ...
    asdfasdf asdfasdf asdfasdfasdfasdf blah foo bar asdfasdf asdfasdf
    What's wrong with that? It got rid of the html tags?
    I think that is all Anonymous Monk wanted to accomplish.
    That is also why I stated in my original post ...

    Do you want something like this?
      LameNerd,
      From the original post:
      $TheLine =~ s/<html>([^\n]*)<\/html>/$1/i;

      The anonymous monk appears to want was it between the HTML tags.
    • You have included what is before and after
    • You have not included a fake html tag

      It doesn't really matter - it just doesn't look like what the anonymous monk was after

      Cheers - L~R

        What can I say your right! ++ to you