You can use negative look behind:
\w+\b(?<!\bboy)
Or negative look ahead since not all support negative look behind
(?!boy\b)\b\w+
You can read about negative look ahead here
More Related Contents:
- Regex to match prefix followed by . and alphabets [closed]
- Using regular expressions to parse HTML: why not?
- What is the best regular expression to check if a string is a valid URL?
- Using explicitly numbered repetition instead of question mark, star and plus
- How to get domain name from URL
- Difference between \w and \b regular expression meta characters
- Regular expression to skip character in capture group
- Regular expression matching
- Verbs that act after backtracking and failure
- How is the AND/OR operator represented as in Regular Expressions?
- Math operations in regex
- Multiple words in any order using regex [duplicate]
- Deprecated: Function split() is deprecated. How to rewrite this statement?
- PostgreSQL Regex Word Boundaries?
- Does bash support word boundary regular expressions?
- 301 Redirect to replace all spaces to hyphens
- RegEx with Excel VBA on Mac
- Regular expression to find two strings anywhere in input
- Regex validate correct ISO8601 date string with time
- Is there any way to put malicious code into a regular expression?
- Design DFA accepting binary strings divisible by a number ‘n’
- Replace all whitespace with a line break/paragraph mark to make a word list
- Regex matching beginning AND end strings
- hgignore: help ignoring all files but certain ones
- Why do regex engines allow / automatically attempt matching at the end of the input string?
- Regex return file name, remove path and file extension
- How do I turn any regex into an complement of itself without complex hand editing?
- Apache mod_rewrite REDIRECT_STATUS condition causing directory listing
- Matching url with array list of words in AngularJS ui-router
- Guide on how to use regex in Nginx location block section?