in reply to Re^2: phrase match
in thread phrase match
A way around that is to use an alternation of look-behinds ...
qr/(?x) (?: (?<= \s ) | (?<= ^ ) ) ( $phrases_re ) (?= \s | $ )/
... although it is debateable whether this is clearer than your suggestions. In general I prefer look-arounds to replacing text with unaltered captures but that's just me.
Cheers,
JohnGG
|
|---|