You are here: Re: Regex to get the <html></html> « PHP Programming Language « IT news, forums, messages
Re: Regex to get the <html></html>

Posted by FFMG on 08/02/07 19:21

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


--

'webmaster forum' (http://www.httppoint.com) | 'Free Blogs'
(http://www.journalhome.com/) | 'webmaster Directory'
(http://www.webhostshunter.com/)
'Recreation Vehicle insurance'
(http://www.insurance-owl.com/other/car_rec.php) | 'Free URL
redirection service' (http://urlkick.com/)
------------------------------------------------------------------------
FFMG's Profile: http://www.httppoint.com/member.php?userid=580
View this thread: http://www.httppoint.com/showthread.php?t=19012

Message Posted via the webmaster forum http://www.httppoint.com, (Ad revenue sharing).

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация