Returns how many times the regex engine can match the given element at most.
This method will treat elements inside lookarounds differently. Elements inside lookarounds will ignore everything outside the lookaround.
/a?/
a
/a+/
a+
/((a{0,8}){0,8}){0,8}/
/(ba{0})+/
a{0}
/(\w(?!a{3}b))+/
(\w(?!a{3}b)))+
Returns how many times the regex engine can match the given element at most.
This method will treat elements inside lookarounds differently. Elements inside lookarounds will ignore everything outside the lookaround.
Examples
/a?/: This will return 1 fora./a+/: This will return infinity foraand 1 for the quantifiera+./((a{0,8}){0,8}){0,8}/: This will return 512 fora./(ba{0})+/: This will return 0 foraand infinity for the quantifiera{0}./(\w(?!a{3}b))+/: This will return 3 forabecauseais inside a lookaround and therefore unaffected by the(\w(?!a{3}b)))+quantifier.