regex - In sed, how to represent "alphanumeric or _ or -" -
tried
[a-za-z0-9-_] [a-za-z0-0\-\_] [[[:alnum:]]-_] ... what correct way represent in regular expression?
it seems [a-za-z0-9-] works alphanumeric or dash. when add underscore, breaks.
that character class:
[[:alnum:]_-] which means allow 1 of these:
1. alpha numeric 1. underscore 1. hyphen it important keep hyphen @ 1st or last position in character class avoid escaping.
Comments
Post a Comment