Hello,
Before asking this question I have Googled for this problem and I have looked through all StackOverflow related questions.
The problem is pretty simple
I have a string "North Atlantic Treaty Organization"
I have a pattern "a.*z", at moment it would match
north ATLATIC TREATY ORGANIZation
But I need it to match complete words only (orgANIZation for example)
I have tried "\ba*z\b" and "\Ba*z\B" as pattern, but I think I don't quite get it
How should I change my pattern in order to match complete words that string contains (without matching multiple words)
The patterns are generated on the fly, user enteres a*z and my application translates it into pattern that matches parts of complete words in string.
My problem is that I don't know what user is going to search for. Ideally I would preppend some regexp to user's expression.
Thank You!