In unixLinux Create a regex that matches cat in My cat is br
In unix/Linux, Create a regex that matches cat in My cat is brown, but not in category or bobcat. Create another regex that matches cat in staccato, but not in any of the three previous matches.
Solution
\\bcat\\b will match cat in My cat is brown,but not in category or bobcat.
\\b is word boundary . Here word boundary is used for matching.
\\Bcat\\B will match staccato, but not in any of the three previous matches.
\\B is not word boundary. so before cat and after cat there can be other characters as in staccato.

