I am attempting to search for 3.07 in a log file however I'm having difficulty with the correct regex. I have tried the following but this returns values matching 3.0 or 3.7:
grep '[3]\.[07]' GDCBAdapter.log
I am attempting to search for 3.07 in a log file however I'm having difficulty with the correct regex. I have tried the following but this returns values matching 3.0 or 3.7:
grep '[3]\.[07]' GDCBAdapter.log
The solution is very simple, you just have to:
grep '3\.07' GDCBAdapter.log
No need for character class, i.e [07]
as it matches 0 OR 7.
Just realised:
grep '[3]\.\08' GDCBAdapter.log