Hi,
I've this regex: ^[\p{L}\p{N}]{1,50}$
- Accept all numbers and all letters
- min length: 1
- max length: 50
I'm trying to add this rule without success:
- can add \s (spaces) but the text can not have only empty spaces
Hi,
I've this regex: ^[\p{L}\p{N}]{1,50}$
I'm trying to add this rule without success:
If your regular expression implementation supports look-ahead assertions:
^(?!\s+$)[\p{L}\p{N}\s]{1,50}$
Assuming it can't start with a space:
^[\p{L}\p{N}]{1}[\s\p{L}\p{N}]{0,49}$