I'm, trying to use grep with a ^ and $ at the same time but for some reason that does not work. If I type
grep '^s.*e' german.dic
I get a lots of words starting with s and having an e somewhere. A snippet from the output
szientistischer
szientistisches
szintigraphische
szintigraphischem
szintigraphischen
szintigraphischer
szintigraphisches
So there is a word 'szintigraphische', which has an e at the end of the line. What I would expect now is that if I typed
grep '^s.*e$' german.dic
that I would at least get that result. However, the resultset is empty. How should I write a correct regexp to find all words starting with an s and ending with an e?
grep '^s.*e$'and it output 'szintigraphische' as it should. Maybe there is extra whitespace at the end of the line in file?'^s.*e\s*$'to skip white spaces if there are any.\s*tells grep to ignore white spaces.