Skip to main content
spelling, formatting
Source Link
Anthon
  • 81.4k
  • 42
  • 174
  • 228

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 loistlots of wordstwords starting with ss and having an ee 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 ss and ending with an e e?

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 loist of wordst 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 ?

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?

Source Link
user50037
user50037

Grep ^ and $ at the same time

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 loist of wordst 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 ?