stringr
stringr copied to clipboard
Regular expressions with `rex()` do not work anymore
stringr::str_detect("apple", rex::rex(maybe("a")))
#> Error in `type()`:
#> ! `pattern` must be a string
Created on 2022-02-23 by the reprex package (v2.0.1)
This is because the change to the class names
regex()
and friends now generate class names withstringr_
prefix
and stringr::type()
is not exported so the rex
package cannot create a correct type()
method.
Maybe the easiest fix would be to just keep type.regex <- function(x) "regex"
?