For Programmers: Free Programming Magazines  


Home > Archive > PHP DB > September 2005 > Re: [PHP-DB] If (test against a regex)









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [PHP-DB] If (test against a regex)
Micah Stevens

2005-09-28, 6:57 pm


www.php.net/preg_match

-Micah


On Wednesday 28 September 2005 3:10 pm, Paul Ohashi wrote:
> Is there a way to test a variable against a regex similar to the way
> Perl uses the binding operator =~ ?
>
> e.g.
> if ($envLine =~ /^* information:/)
>
> Will match:
> Environment information:
> Plugin information:
> Etc information:
>
>
> Thanks in advance,
> Paul

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com