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

Popular posts from this blog

Why can rails not find a route created by a helper? -

javascript - jquery or ashx not working -

opencv - DataType<cv::detail::deriv_type>::depth what is it used for -