Posted by gosha bine on 08/02/07 23:15
FFMG wrote:
> gosha bine;84884 Wrote:
>> I'd suggest
>>
>> $re = <<<HTML
>> ~
>> <\w+ \b
>> (?: " [^"]* " | ' [^']* ' | [^"'>]+ )*
>> | </ \w+ >
>> | [^<]+
>> | <
>> ~six
>> HTML;
>>
>>
>
> This looks great, and works for all cases.
>
> I am just curious, why does...
> // --
> <head>
> <meta name='' />
> </head>";
>
> // --
> Return
> // --
> 0:
> 1:<head>
> 2:
> 3:<meta name='' />
> 4:
> 5:</head>
>
> What are the blank/empty lines matching?
>
> FFMG
>
>
2 and 4 match newlines that are there after head and meta tags.
--
gosha bine
extended php parser ~ http://code.google.com/p/pihipi
blok ~ http://www.tagarga.com/blok
Navigation:
[Reply to this message]
|