in reply to Re^4: Generalising string in patternin thread Generalising string in pattern
... and add a leading and/or trailing \s* ;-)
(update: only needed if the pattern is anchored)