"?" as regex

42 views
Skip to first unread message

tq_bt

unread,
Jul 25, 2021, 6:51:50 AM7/25/21
to Automate
split("What? Shit!","?") is not working

java.util.regex.PatternSyntaxException: Syntax error in regexp pattern near index 1
?
 ^

Bushmills

unread,
Jul 25, 2021, 7:01:03 AM7/25/21
to Automate
doubly escape the regexpr,  as in  "\\?"
Reply all
Reply to author
Forward
0 new messages