Regex whitespace word boundary

regex

Solution

`\b` is a word boundary.

So, `\b` is similar to `[^a-zA-Z0-9_]` i.e `\b` would check for anything except `word`

You can instead use this regex

(?<=\s|^)[a-zA-Z]+(?=\s|$)
-------- --------- ------
   |         |       |->match only if the pattern is followed by a space(\s) or end of string/line($)
   |         |->pattern
   |->match only if the pattern is preceded by space(\s) or start of string\line(^)

Problem

I have this expression ``` \b[A-Za-z]+\b ``` If I give `abc@de mnop`, it matches `abc`, `de` and `mnop`, but I want it to match only `mnop`. How can I do that?

Original source