in reply to Regex question : How to match \w and just the dash
To clarify and to be totally A.R., I think you meant "hyphen." HTML provides for both kinds of dashes: 1. –, used for ranges of things (Monday–Friday); 2. —, used for breaks in thought ("Perlmonks—an online community—is a friendly place"), and, of course, the hyphen which is used for word breaks.
All that to say: s/[a-zA-Z\-]+//g; would be my take, not seeing your input.
|
|---|