do you mean to say that metacharacters do not matter when using quantifiers?
Jim Yingst
Wanderer
Sheriff
Joined: Jan 30, 2000
Posts: 18652
posted
0
It's not that the metacharacter doesn't matter at all. But if the quantifier can be zero, then the pattern can match zero occurrences of the metacharacter. So there are at least some possible matches where the metacharacter does not occur at all.
Try using + instead of * - you will see that + means at least one occurrence of the preceding character. So it will not give you this behavior of "ignoring" that character. [ May 13, 2008: Message edited by: Jim Yingst ]
"I'm not back." - Bill Harding, Twister
Krishan Chauhan
Ranch Hand
Joined: Mar 12, 2008
Posts: 32
posted
0
Hi Jim
Thanks for your reply.
When you use quantifiers, does it account for all the characters preceding it or the immediate one? Do we have any option regarding this?
If i use seach pattern as a.*c in place of a.c*, it works like a greedy quantifier. Could any one tell me what's the difference between above two pattern?