Re: how to explain such a regular syntax
| From: | Peter Lind | Date: | Fri, 13 Aug 2010 06:51:06 +0000 |
| Subject: | Re: how to explain such a regular syntax | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-47305@lists.php.net to get a copy of this message | ||
On 13 August 2010 08:47, win.a <win.acc@gmail.com> 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>