When you have done that you will know that a negated character class like [^a-zA-Z\d.:] is what you are after. But read the documentation first.
As a (IMHO extremely interesting) side note re \d, the latter may match way much more than one could naively expect, depending on locale: for more info please read
| [reply] [d/l] [select] |
Premise
In reply to a /msg by GrandFather, I'll point out that the above links are not "broken", but refer to USENET urls and not everybody may have a news client installed nor a system configured to launch it on such urls, thus for ease of use I'll give GG urls for these clpmisc posts:
Summary
The whole thread started at this post. To sum up the story, someone asked something about some Perl code he's seen, which included \d. So someone else explained that (to quote literally)
\d matches "0", "1" ... "8" or "9"
At this point yet another poster answered that
Last time I checked, \d matched 268 different characters. Dear
programmer, if you mean 0-9, then write 0-9.
This spawned a sub discussion, because a fourth poster, and very well known contributor to the group pointed out that he while was aware that \w will match not only 'a'..'z', 'A'..'Z', '0'..'9', and '_', but possibly much more, depending on locale, it was not just obvious to him that \d will match anything but [0-9]. It was not obvious to me either, especially since I hardly know anything about this whole locales stuff, and that's why I'm reporting it here.
Further replies included two test/example scripts, which I'm pasting hereafter, unmodified.
The first script
The second script
Conclusion
Edit: g0n - readmore tags
| [reply] [d/l] [select] |