It matches that line because of the 'd' alright, but not because it's a hexdigit, but because it is contained in [digtx]...Neo wrote: Considering that the 'world' contains a valid hex digit ('d') would that explain anything?
An expression
Re:An expression
Every good solution is obvious once you've found it.
Re:An expression
Hmm... so a hexdigit means anything with an 'x'?AR wrote: I tried "egrep -o [:xdigit:] a.txt" and got:So your assumption is probably correctx
x
d
Only Human
Re:An expression
No. What was said is that [:xdigit:] is broken, and grep doesn't understand that it has a special meaning, and therefore it works like a normal character group, which containts :, x, d, i, g, t and a duplicate of i and : which are ignored.
Btw... now that I tried it on localhost, I notice that even GNU grep seems not to understand those, at least not without some magick switch (which I'm too lazy to figure out right now for no good purpose).
Btw... now that I tried it on localhost, I notice that even GNU grep seems not to understand those, at least not without some magick switch (which I'm too lazy to figure out right now for no good purpose).