我如何处理特殊字符,如$*+()[{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 ""\["
萧十郎
随时随地看视频慕课网APP