I need to match only those words which doesn\'t have special characters like @
and :
.
For example:
git@github.com
shouldn\'t
You can use negative lookbehind and negative lookahead patterns around a word pattern to make sure that the word is not preceded or followed by a non-space character, or in other words, to make sure that it is surrounded by either a space or a string boundary:
(?
Demo: https://regex101.com/r/cjhUUM/2