I have a regular expression
^[\\p{L}\\d._]*\\p{L}+[\\p{L}\\d._]*$
which accepts alphabets,alphanumerics and special characters like . and _ . Can we make this regular expression accept total minimum length of three(including characters,alphanumerics etc) and maximum of 15(including characters,alphanumerics etc)
Thanks,
Balaji.
To add an extra check that the total length is between 3 and 15 you can use lookahead:
A group of the form
(?=<regex>)checks if<regex>matches from the current position, but doesn’t move the marker forward.