Regular expressions support breaking the word \b .
Finding the existence of the word โeverythingโ in a string is as simple as:
>> 'the word "all"'[/\ball\b/]
Note that he did not bind it to the beginning or end of the line, because \b also recognizes the beginning and end of the line as word boundaries.
the tin man
source share