You can use parentheses () to group characters or words to make them one piece in the eyes of the regex engine:
$ echo "welcome to shell scripting" | awk '/(shell scripting)/{print $0}'$ echo "welcome to bash scripting" | awk '/(shell scripting)/{print $0}'$ echo "welcome to shell scripting" | sed -r -n '/(shell scripting)/p'$ echo "welcome to bash scripting" | sed -r -n '/(shell scripting)/p'
Since the shell scripting string is grouped with parentheses, it will be treated as a single piece.
So, if the entire sentence doesn't exist, the pattern will fail.
You may have realized that you can achieve that without parentheses ...