Which regex should be used to match "at" when the input is 'Hat at work"?
The preceding regex should be used because \b (word boundary) stops the regex engine to match at in Hat, because \bat\b can match full words only.
What should be regex if we only want to match at in Hat but not the one that was matched in the preceding regex?
Now, this regex will match at that is a part of Hat because \B asserts a position that is between two word characters or a position between two non-word characters. Because of the presence of \B in the regex, it matches at only in Hat but not the word at.
If the input is suppress expression press depression, what will be the matches if the regex is \Bpress\B ...