我如何处理特殊字符,如$*+()[{in my regex]?
\^$.?*|+()[{
x <- "a[b"grepl("[", x)## Error: invalid regular expression '[', reason 'Missing ']''
stringr::str_detect(x, "[")
stringi::stri_detect_regex(x, "[")
.)
grepl("[[", x)## Error: invalid regular expression '[[', reason 'Missing ']''
grepl("\[", x)## Error: '\[' is an unrecognized escape in character string starting ""\["