I need a little help with regex to match and replace
<comma|dash|fullstop|questionmark|exclamation mark|space|start-of-string>WORD<comma|dash|fullstop|space|end-of-string>
I need to find a specific WORD (case insensitive) which
is preceded by: comma or dash or fullstop or question mark or exclamation mark or space or start-of-string
and is followed by: comma or dash or fullstop or question mark or exclamation mark or space or end-of-string
test string: MATCH me, yes please,MATCH me but dontMATCHme!MATCH me and of course MATCH, and finally MATCH
I want to REPLACE all matches with another string in PHP, so i possibly need to use preg_replace or something?