Posted by Sven Lauritzen on 09/28/05 05:36
Am Dienstag, den 27.09.2005, 17:17 -0700 schrieb Con:
> Hi, I'm in the process of converting some PERL to PHP. Thus, is it
> possible to leave the following line as is:
>
> if ($id =~ /vvvvv/g) {
The php equivalent is
if(preg_match('/vvvvv/', $id)) {
I'm quite sure that you won't need the "g".
See
http://www.php.net/manual/en/function.preg-match.php
Best regards
Sven
--
Sven Lauritzen
--------------------------------------------------------------------
mailto: the minus pulse at gmx dot net
pub 1024D/95C9A892 sub 1024g/D30E490F ABCDEFGHIJKLM
Fp 2FA9 FC9B 078C 5BC7 87DC 0B0D 2329 94F6 95C9 A892 NOPQRSTUVWXYZ
--------------------------------------------------------------------
[Back to original message]
|