Page 2 of 2
Re:An expression
Posted: Fri Jul 15, 2005 6:59 am
by Solar
Neo wrote:
Considering that the 'world' contains a valid hex digit ('d') would that explain anything?
It matches that line because of the 'd' alright, but not because it's a hexdigit, but because it is contained in [digtx]...
Re:An expression
Posted: Fri Jul 15, 2005 7:32 am
by Neo
AR wrote:
I tried "egrep -o [:xdigit:] a.txt" and got:
x
x
d
So your assumption is probably correct
Hmm... so a hexdigit means anything with an 'x'?
Re:An expression
Posted: Fri Jul 15, 2005 9:08 am
by mystran
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).