I need a syntax that pulls a string that may be up to 10 numbers or could also include characters.
Hi Michelle Goodman,
Can you provide more details what you are trying to do?
Are you trying to limit the number of characters in a string? If so, Try with ^hA-Za-z0-9]{0,10}$ which allows you to limit the number of characters to 10. you can choose small/upper case and numbers.
Try to construct your regular expression in Online regex tester and debugger: PHP, PCRE, Python, Golang and JavaScript and use it.
Thanks,
^w{1,10}$
Hi Lakshmi
With ^^A-Za-z0-9]{0,10}$ will this pick up the text if it starts with numbers and then letters?
Thanks
Hi Michelle Goodman,
Yes it will allow either alphabets(small/upper) or numbers or mix up to 10 characters. If you want try in the Online regex tester and debugger: PHP, PCRE, Python, Golang and JavaScript site before once.
Thanks,
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.