PHP RegEx: (a|b)*c --> Could it return just 'c'?
Posted: Wed May 03, 2006 12:44 am
I am on a RegEx tutorial and it's stating that:
"(a|b)*c": a string that has a sequence of alternating a's and b's ending in a c.
Given that the asterisk (*) means zero or more, wouldn't this type of string search also just return every instance of 'c'?
"(a|b)*c": a string that has a sequence of alternating a's and b's ending in a c.
Given that the asterisk (*) means zero or more, wouldn't this type of string search also just return every instance of 'c'?