regex - How to find out the maximum and minimum length of strings that match to a given regular expression -


a theoretical question. have regex. want find strings match this. how can minimum , maximum length of these strings?

you need parse , analyse regex. classical regexes pretty straight-forward work out bounds on lengths. if include look-aheads , look-behinds rather complicated, problem tractable (i think).

i'm not aware of library methods (in java). hardly surprising. use-cases functionality must few , far between.


Comments

Popular posts from this blog

java - BeanIO write annotated class to fixedlength -

Using Java 8 lambdas/transformations to combine and flatten two Maps -

How to connect android app to App engine -