I am reading one line in at a from a text file, using FileSystemObject.
In order for this to be a true condition, there will be a word to be matched and a group of words not to be matched.
I am not sure where to start with the pattern:
Include to be matched word: America
Exclude to be matched words: Jack|and|Jill
I got this to work:
"This is the America!"
"^(\w*|\s*)*(America)(\w*|\s*)*\!?$")
The above should return True.
"This is the America! Jack and Jill lives here."
The above should return False.
I basically know how to find a whole word but don't know how to exclude a whole word. If my logic is not correct, please feel free to correct and enlighten.
In order for this to be a true condition, there will be a word to be matched and a group of words not to be matched.
I am not sure where to start with the pattern:
Include to be matched word: America
Exclude to be matched words: Jack|and|Jill
I got this to work:
"This is the America!"
"^(\w*|\s*)*(America)(\w*|\s*)*\!?$")
The above should return True.
"This is the America! Jack and Jill lives here."
The above should return False.
I basically know how to find a whole word but don't know how to exclude a whole word. If my logic is not correct, please feel free to correct and enlighten.