# \b equivalent: (?(?<= \w) # if there is a word character left (?! \w) # then there must be no word character right | (?= \w) # else there must be a word character right ) # \B equivalent: (?(?<= \w) # if there is a word character left (?= \w) # then there must be a word character right | (?! \w) # else there must be no word character right )