I have a textfile, containing something like:
12,34 EUR
5,67 EUR
...
There is one whitespace before 'EUR' and I ignore 0,XX EUR.
I tried:
grep '[1-9][0-9]*,[0-9]{2}sEUR' => didn't match !
grep '[1-9][0-9]*,[0-9]{2} EUR' => worked !
grep '[1-9][0-9]*,[0-9]{2}s*EUR' => worked !
grep '[1-9][0-9]*,[0-9]{2}s[E]UR' => worked !
Can somebody explain me pls, why I can't use s
but s*
and s[E]
matched?
OS: Ubuntu 10.04, grep v2.5
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…