In basic regular expressions the meta-characters ?, +, {, |, (, and ) lose their special meaning; instead use the back-slashed versions \?, \+, \{, \|, \(, and \).
-E option interprets PATTERN as an extended regular expression. So you don't have to use the back-slashed versions. Since I did not use this option I had to use back-slashed versions.
It isn't clear to me whether tinku91 wants one expression that will match all six words or three different patterns each matching two words. But the following script should give you what you want:
I suspect that SIGTSIP is a typo and that what is really wanted is SIGTSTP, but this script looks for what was requested. Note also that any line that contains harrison also contains harris so there is no need to check for both harris and harrison .
Note to bipinajith:
grep "^[SIG]\{3\}\(STOP\|TSIP\)" reg_exp
is not portable; many systems don't allow backslash escaped ERE syntax in BREs. The request didn't say anything about only matching at the start of a line. And, [SIG]{3} in an ERE will match GGG, III, SSS, GGi, GGS, etc. in additional to SIG.