Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Nov 28, 2012 09:14 PM by gerrylowry
Nov 28, 2012 08:27 PM|LINK
I am looking for the regular expression to show me matches of *lblCorrect only e.g.
aaalblCorrect = match
lblCorrect = match
222lblCorrect = match
lblCorrectSSS = no match
I am using new Regex(".*lblCorrect") but it comes back as 'lblCorrectSSS' as match which I dont want
Any help will be greatly appreciated
Nov 28, 2012 08:32 PM|LINK
try this: \blblCorrect\b
http://www.regular-expressions.info/wordboundaries.html for more information.
Nov 28, 2012 09:07 PM|LINK
Gerrylowry is correct use boundries.
However drop the first \b in the line he suggested so the expression will fit your needs:
Link to tester:
Nov 28, 2012 09:11 PM|LINK
Thank you so MUCH !!!!
Nov 28, 2012 09:14 PM|LINK
yes, you are correct ... i misread the O.P. and erroneously thought that only "lblCorrect" was acceptable.
the tester link that you gave confirms this.