Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback, please email oracle-forums_moderators_us@oracle.com

Long running regex detection in Pattern class

1167993Aug 25 2023 — edited Aug 25 2023

Is there a way to detect long running regex in Pattern/Matcher class other than timing match call? A way to check how many times a character match is done will be preferred solution. Calling code could get an exception at set number of calls. As of now it is not possible to extend Pattern class and override match methods of its inner final classes.

Comments
Post Details
Added on Aug 25 2023
0 comments
127 views