|
Posted by AnrDaemon on 12/21/07 17:40
Greetings, Moi.
In reply to Your message dated Tuesday, December 18, 2007, 17:29:22,
> Hello,
> On 18 dйc, 05:34, Toby A Inkster <usenet200...@tobyinkster.co.uk>
> wrote:
>> Patrick Drouin wrote:
>> > $pattern="/((a+)b?(c+))/";
>>
>> $pattern="/(a+)b?(c+)/";
> If you try this, you will see that it spit out
> [0] => aaabccc
> [0] => aaa
> [0] => ccc
TH, it is
[0] => aaabccc
[1] => aaa
[2] => ccc
which is HIGHLY different.
> That's not what I'm looking for...
RTFM FTW.
In (0) it always return the whole matched [sub]string.
Just ignore the [0] entry if You do not want to deal with it.
--
Sincerely Yours, AnrDaemon <anrdaemon@freemail.ru>
Navigation:
[Reply to this message]
|