Search code examples
regexgrephexcharacter-class

why does [[:xdigit:]] highlight letter e in grep results?


Why does below command highlight e as well with digits?

grep '[[:xdigit:]]' search.txt

enter image description here


Solution

  • This is intended, as it searches for hexadecimal digits.

    The man-page states:

    enter image description here