in reply to Re: REGEX different on Linux & Win32!
in thread REGEX different on Linux & Win32!

It can recognize those CODE sections as well.

Actually, good though HTML::TokeParser is it does not recognise them

$data = q` HTML1 <% CODE1 %> HTML2 <% CODE2 %> HTML3 <p>foo</p> `; use Data::Dumper; use HTML::TokeParser; my $parser = HTML::TokeParser->new( \$data ); while ( my $token = $parser->get_token() ) { print Dumper($token) if $token->[1] =~ m/<%/; } __DATA__ $VAR1 = [ 'T', '<% CODE1 %> HTML2 ', '' ]; $VAR1 = [ 'T', '<% CODE2 %> HTML3 ', '' ];

cheers

tachyon

s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print

Replies are listed 'Best First'.
Re: Re: Re: REGEX different on Linux & Win32!
by cfreak (Chaplain) on Feb 25, 2003 at 16:09 UTC

    Opps, I assumed since it recognizes <? and  ?> that it would do  <% style as well. That's what I get for assuming! Though I would consider that a bug of HTML::TokeParser.

    Lobster Aliens Are attacking the world!
      I would not. <% doesn't mean anything special in HTML, it's just a less than sign followed by a percent sign. Since it's not an HTML token, I'd consider it a bug if HTML::TokeParser would consider it a token.

      Abigail