Adds the $ anchor to the end of the pattern, ensuring
the match must continue until the very last character of the string.
xp_wrap_end(pattern)A regexpert object.
# Match ".com" only if it's at the very end
xp_build_literal(".com") %>% xp_wrap_end()
#> <regexpert pattern>
#> .com$
# Match an exact 5-digit string (start to end)
xp_build_digits() %>% xp_op_repeat(5) %>% xp_wrap_start() %>% xp_wrap_end()
#> <regexpert pattern>
#> ^(?:\d){5}$