in reply to Regex Question
Maybe you can have capital letters too, in which case you need to add a /i to that.
Another way that avoids capturing altogether: s/(?<=[a-z])\s+(?=[a-z])//g
Finally, I don't know how your current regex is working, but you can almost certainly do it in there rather than adding a new regex to first remove the whitespace. Something like this
perhaps?$ perl -nle 'print "$1|$2" while /\s*([a-z\s]*[a-z])\s+(\d+)/g' foo bar 1, baz qux 2, whatever 3, and some garbage. foo bar|1 baz qux|2 whatever|3
-sauoq "My two cents aren't worth a dime.";
|
|---|