Adds \b to both sides of the pattern. This ensures that the
pattern is matched as a whole word (not inside another word).
xp_wrap_boundary(pattern)A regexpert object.
# Match "cat" but not "category" or "bobcat"
xp_build_literal("cat") %>% xp_wrap_boundary()
#> <regexpert pattern>
#> \bcat\b