regex - Regular Expression function for maximum 15 characters -


i need regular expression reference number entered user takes maximum of 15 characters (numbers , letters only). how best implement this? here have tried date.

private static final string my_account_number = ("[^a-za-z0-9]"); 

^[a-za-z0-9]{1,15}$ 

^: start of string, followed by...

[a-za-z0-9]: ...any alphanumeric character...

{1,15}: ...1 15 times, followed by...

$: ...the end of string.


Comments

Popular posts from this blog

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

c - Unrecognised emulation mode: elf_i386 on MinGW32 -