How to Catch Exact Match "OS"

how to get Below String “OS”

XX="14KW 1/3CTW RD DIA WB TOSET “OS”

i need to use in this if xx.ToString.Contains(“OS”) then Customer=“ABC” else “BCD”
but need exact OS
regards,
Ram Gurav

is this your string value? why I am asking is it does not have end quotes …OS at the end has smart quotes…kind of mix and match of quotes…

"14KW 1/3CTW RD DIA WB TOSET OS”

this is string value
if have only OS (separate OS not in middle of any text)

Regex $ means end of line

grafik

but this come in middle also like "14KW 1/3CTW OS RD DIA WB TOSET ”

grafik

thank you dear its work thank you so much

For closing the topic, here the explanation on \b from regex101.com
grafik

May we ask you to close the topic after your final testing by marking the solving post as solution. So others can benefit from it. Thanks

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.