regular expression – regex: how come the trademark symbol matches to a-z?
Sorry if this is a repeat or basic question but it is hard to search for a ™. I’m writing a script to remove weird characters from file names.
How come the trade mark symbol ™
matches [^a-z]
???
$ echo "AMD Ryzen™ 5 2600X Processor rstuv" |sed 's/[^A-Z]//g'
AMDRXP
$ echo "AMD Ryzen™ 5 2600X Processor rstuv" |sed 's/[^a-z]//g'
yzen™rocessorrstuv
$ echo "AMD Ryzen™ 5 2600X Processor rstuv" |sed 's/[^s-t]//g'
ssst
$ echo "AMD Ryzen™ 5 2600X Processor rstuv" |sed 's/[^t-u]//g'
™tu
™
seems to be between t
and u
?
Read more here: Source link