java.util.regex.PatternSyntaxException: Unclosed character class near index 26 ([\\\^\$*+[\]?\{\}.=!:(|)]) ^

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via sourceforge.net by Unknown author, 2 years ago
Unclosed character class near index 26 ( ) ^
via htmlunit by rschwab
, 1 year ago
Unclosed character class near index 26 ([\\\^\$*+[\]?\{\}.=!:(|)]) ^
via Stack Overflow by AAjit
, 10 months ago
via Stack Overflow by AdemIlhan
, 2 years ago
Unclosed character class near index 0 [ ^
via Stack Overflow by user1601302
, 2 years ago
Unclosed character class near index 6 [&@;^\] ^
via Stack Overflow by Kiran
, 2 years ago
java.util.regex.PatternSyntaxException: Unclosed character class near index 26 ([\\\^\$*+[\]?\{\}.=!:(|)]) ^
at java.util.regex.Pattern.error(Pattern.java:1713)
at java.util.regex.Pattern.clazz(Pattern.java:2254)
at java.util.regex.Pattern.sequence(Pattern.java:1818)
at java.util.regex.Pattern.expr(Pattern.java:1752)
at java.util.regex.Pattern.group0(Pattern.java:2530)
at java.util.regex.Pattern.sequence(Pattern.java:1806)
at java.util.regex.Pattern.expr(Pattern.java:1752)
at java.util.regex.Pattern.compile(Pattern.java:1460)
at java.util.regex.Pattern.(Pattern.java:1133)
at java.util.regex.Pattern.compile(Pattern.java:847)

Users with the same issue

Once, 4 days ago
6 times, 1 week ago
Once, 1 week ago
3 times, 4 weeks ago
Once, 2 months ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.