Re: [PHP-DB] how to explain such a regular syntax

[email protected] (Peter Lind)
Newsgroups php.db
Message-ID <[email protected]>
On 13 August 2010 08:47, win.a <[email protected]> wrote:
> Its was picked from drupal source code and i don't know how does it works.
> This is the code :
> preg_match('/^\[?(?:[a-z0-9-:\]_]+\.?)+$/', $host);

This has got nothing to do with php or php-db - your question is on
regular expressions. Try consulting
http://www.regular-expressions.info/ or get a good book on the topic
like Mastering Regular Expresssions by Jeffrey Friedl.

Regards
Peter

-- 
<hype>
WWW: http://plphp.dk / http://plind.dk
LinkedIn: http://www.linkedin.com/in/plind
BeWelcome/Couchsurfing: Fake51
Twitter: http://twitter.com/kafe15
</hype>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.