florianingerl / com.florianingerl.util.regex

Java regex library
MIT License
45 stars 5 forks source link

API feature: Get minimum/maximum length of a possible match #14

Open karalus opened 1 year ago

karalus commented 1 year ago

I would appreciate this amendment of the API because it can make my code cleaner, i.e. I can do without using reflection for accessing package protected functionality. Look at my Hack

It is also helping to gain better performance in some scenarios: If you know in advance that a string cannot match the Pattern because it is not matching the minLength/maxLenght, you can go without creating a Matcher-instance saving memory and CPU.