Java regex parser without

Processing a regular expression with the help java.util.regexleads to a stack overflow for large lines and a complex regular expression (especially with |it).

Is there a way to handle regular expressions more efficiently in Java, for example

  • with non-recursive mode for regular expression
  • throws a catching exception for these regular expressions (instead of the java.lang.Stackoverflow error)

or any other mechanism that does not kill my program or does not transfer it to an irreparable state?

+4
source share
1 answer

StackOverflowError , . , , , , . ( ).

-Xss .

0

All Articles