Regular error in UDF java.lang.stackoverflowerror

Errors are reported as follows:

Exception in thread "main" java.lang.StackOverflowError
	at java.util.regex.Pattern$Loop.match(Pattern.java:4779)
	at java.util.regex.Pattern$GroupTail.match(Pattern.java:4731)
	at java.util.regex.Pattern$Curly.match0(Pattern.java:4286)
	at java.util.regex.Pattern$Curly.match(Pattern.java:4248)
	at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3812)
	at java.util.regex.Pattern$GroupHead.match(Pattern.java:4672)
	at java.util.regex.Pattern$Loop.match(Pattern.java:4799)
	at java.util.regex.Pattern$GroupTail.match(Pattern.java:4731)
	at java.util.regex.Pattern$Curly.match0(Pattern.java:4286)
	at java.util.regex.Pattern$Curly.match(Pattern.java:4248)
	at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3812)
	at java.util.regex.Pattern$GroupHead.match(Pattern.java:4672)
	at java.util.regex.Pattern$Loop.match(Pattern.java:4799)
	at java.util.regex.Pattern$GroupTail.match(Pattern.java:4731)
	at java.util.regex.Pattern$Curly.match0(Pattern.java:4293)
	at java.util.regex.Pattern$Curly.match(Pattern.java:4248)
	at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3812)
	at java.util.regex.Pattern$GroupHead.match(Pattern.java:4672)
......

Java.lang.stackoverflowerror error. Finally, it is positioned as regular expression stack overflow. It is found that the data of some rows are matched too much by regular expression
the final solution is to enter the matching when the length of this row is less than 10000, otherwise null is returned
add the following code


Read More: