in reply to Re^4: Generalising string in pattern
in thread Generalising string in pattern

... and add a leading and/or trailing \s* ;-)

(update: only needed if the pattern is anchored)