Monday, May 21, 2018

java - clear understanding on possesive quantifiers

i have read so many questions and answers on possessive quantifiers in java in this website and java tutorials but men, am still confused!! am not understanding!! for example lets say




 my regex is .*+foo
my input string is mdfoo


according to my understanding,



.(dot) means there are other characters before foo

*(star) means if foo should be writen in a string form if found by regex


+foo means that a string should end with foo for it to match


and in my input string,it ends with foo. but when i receive a statement that there was no match when i run my program! how is this happening and what should i do still using the (+) quantifier to receive a match ?. thanks in advance

No comments:

Post a Comment

plot explanation - Why did Peaches' mom hang on the tree? - Movies & TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...