Below is my string from which i want to find substring:
pull if {{MySQL}}.EmployeePerson!.City is 'Seattle' then {{MySQL}}.EmployeePerson!.StateProvinceID else '0' as StateProvinceID from {{MySQL}}.EmployeePerson!
and here is my regular expression
EmployeePerson!\b
so i need to find "EmployeePerson!" string but i am not able to get any result , so please help.
Thanks in advance.
When you put
\bafter!, you require a word char after!.See what word boundary matches:
Thus, you need to remove
\bif you do not need to check the context after!, or replace\bwith\Bthat will require a non-word char or end of string.To find
EmployeePerson!as a whole word, just useor
or - if you need to make sure there are spaces or start/end of string on both ends:
or - if you want to make sure there are no words chars on both ends: