I have a regular expression that tries to combine predefined character class \ s with , :
String rgx = "[^\s,]"
But I get an error that \ s is an illegal escape character. I cannot double the \ s backslash because if I do this, the character class will be interpreted as a backslash and the letter 's'. What can I do?
source
share