Hi All
Requesting help on this one. I am working on a JAVA based tool 'webMethods' which provides built-in functionality to replace char/string from a given input, it also excepts RegEx to match the search string.
My requirement to create a RegEx which can be supplied to the above built-in functionality to match any string (that can contain new lines and other white space characters) only if it doesnt have a particular word say
BRANCH.
Examples of positive matches can be-- The bank of America.
- The #123 bank.
- @$%# (*%&.
Examples of negative matches can be-- BRANCH
- The #123 BRANCH of this bank.
- This is the last BRANCH.
- BRANCH BRANCH
I tried using the expression
[\s\S\s]*(?!BRANCH)[\s\S\s]*, but this does'nt work for all the scenarios.
Thanks !!