On 11 Mar 2004 Raditha Dissanayake wrote:

>       print "Matches:  " . preg_match('/((?i)rah)\s+\1/', "RAH RAH") . "\n";
>       print "Matches:  " . preg_match('/((?i)rah)\s+\1/', "rah rah") . 
> 
> 
> is what you should use.

Oh.  Of course -- I knew it was obvious!  This also works:

        print "Matches:  " . preg_match("/(a)\\1/", "aa") . "\n";
        print "Matches:  " . preg_match("/((?i)rah)\\s+\\1/", "RAH RAH") . "\n";
        print "Matches:  " . preg_match("/((?i)rah)\\s+\\1/", "rah rah") . "\n";

--
Tom

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to