Hi,
I am trying to get a regular expression that will match on any of the following strings:
Sales Director:
Managing Director:
Sales Manager:
General Manager - Power:
Finance Director:
Procurement Manager:
Director:
Director:
Managing Director:
Finance Director:
Sales Director:
Managing Director:
Sales Manager:
Finance Director:
Procurement Manager:
But not on:
print directories and guides
defence Industry Directory
so far I have:
/(manager|director)/i
But this is obviously going to match on directories, directory etc.
I know the $ sign signifies the end of a word but I cannot get the right syntax.
Should I be using word boundaries like \b
?
I also DO NOT want to pull back whole sentences with manager or director in the sentence. I think I want a maximum of 2 words where manager or directory is the first or second word. Is this possible?
Can anyone point me in the right direction?
Cheers
Paul