I have a Windows-10 machine, on which I've installed a Ubuntu platform, as can be seen in following uname -a
result:
Linux DOMINIQUEDS 4.4.0-43-Microsoft #1-Microsoft Wed Dec 31 14:42:53 PST 2014 x86_64 x86_64 x86_64 GNU/Linux
I have some files which contain lots of entries like:
18bd6344 mfc110u!CPtrArray Size:[1046]
18bd63f4 mfc110u!CPtrArray Size:[1046]
18bd64a4 mfc110u!CPtrArray Size:[1046]
18bdcef4 mfc110u!CPtrArray Size:[4]
18bdcfa4 mfc110u!CPtrArray Size:[8]
18bdd054 mfc110u!CPtrArray Size:[49]
18bdd104 mfc110u!CPtrArray Size:[498]
18bdd1b4 mfc110u!CPtrArray Size:[498]
The mentioned sizes vary from 1 to many millions, and I'm interested in the larger ones, let's say the ones who contain at least three digits.
I can do this using following regular expression:
grep "Size:\[[0-9][0-9][0-9]" Log1.log // this is working fine
I expected following regular expression to give the same result:
grep "Size:\[[0-9]{3,}" Log1.log
But I get nothing.
I've just verified man grep
, and this explanation contains the following:
...
Repetition
...
{n,} The preceding item is matched n or more times.
So why is this not working?
grep "Size:\[[0-9]\{3,\}" Log1.log