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:
pr
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.
[EMAIL PROTECTED] wrote:
I must be missing something obvious ... I am trying to use
backreferences in a PCRE regexp to check for a r
I must be missing something obvious ... I am trying to use
backreferences in a PCRE regexp to check for a repeated character, but
they don't seem to work. I've used regexps often before, but never
needed backreferences.
For example this:
print "Matches: " . preg_match("/(a)\1/", "aa"
3 matches
Mail list logo