Sure, what you want are lookbehind and lookahead assertions: s/(?<=[[:alpha:]])\s+(?=[[:alpha:]])//g; I used the POSIX character class for alphabetics there. You may want to try unicode instead if your perl is up to it and you have the need.
After Compline,
Zaxo
In reply to Re: Regex Question
by Zaxo
in thread Regex Question
by TacoVendor
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |