Assume i have a big paragraph, in which there are words are like found
field
failed
fired
killed
(so many negative words i know!!)
Now, I want to fetch line which have words starting from fi
hi
or k
and ends with eld
or ed
How would i go about searching this pattern of word in string....??
keep in check that i am asking about word pattern in string, not string pattern
These 2 surely didn't worked
egrep "^(f[ai]|k)+(eld|ed)$"
and
egrep "\<(f|k)+(eld|ed)$\>"
I'll admit i am not a hulk of regex
, doing it out of basic understanding, so any one willing to suggest a better way (with some description) is most welcome too!! :)