Converts raw text into a safe regex pattern by escaping special characters.
xp_build_literal(pattern = NULL, literal = NULL)A regexpert object.
# Safely match a price with a dollar sign and decimal
xp_build_literal("$") %>% xp_build_digits() %>% xp_build_literal(".") %>% xp_build_digits()
#> <regexpert pattern>
#> $\d.\d
# Starting a chain with a literal
xp_build_literal("v1.0") %>% xp_wrap_boundary()
#> <regexpert pattern>
#> \bv1.0\b