Appearance
Using sed and regex for text case conversion
Replacing lowercase hexcodes with uppercase.
sed -E 's/#[[:alnum:]]+/\U&/g' foobar.xml
#hashtag[:alnum:]is a POSIX bracket expression and captures all Alphanumeric characters[a-zA-Z0-9]+quantifier 1 to many\U&match is converted to uppercase - more info
GNU sed uses POSIX.2 BREs. The -E option switches to using extended regular expressions instead.