I want a regex using the grep command which only prints out the hexadecimal-notated strings.
This is my command:
grep "0x[A-Fa-f0-9]{1,6}" test.txt
test.txt:
0x2a
0xF
0x1111
0x0ZZZ
0x4dz5
Expected output:
0x2a
0xF
0x1111
Output: Empty
How to do this? Thanks