- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2023 01:26 PM
Hi Community,
I am currently using a regular expression of .{1,30} to limit the characters to 30 on a field. I want to add to it so no spaces (beginning, middle or end) are allowed and no special characters are allowed. Can anybody help with this? Thanks!
Solved! Go to Solution.
 
					
				
		
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2023 06:34 AM
Hi @chrish5,
This should be better 🙂
^([A-z]|[0-9]){1,30}$
Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.
 
					
				
		
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2023 01:44 PM
Hi @chrish5,
Try ([A-z]|[0-9]){1,30}
Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2023 05:18 AM
Hi Peter. Thanks for your reply. I tried that but it still allows spaces at the begging and end of the string. I would like to prohibit spaces anywhere in this 30 character max string. Any idea on how to accomplish that?
 
					
				
		
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2023 06:34 AM
Hi @chrish5,
This should be better 🙂
^([A-z]|[0-9]){1,30}$
Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2023 06:42 AM
Hi Peter,
When I test this it catches the spaces in the middle, but unfortunately it is still allowing spaces at the beginning and the end of the string.
Thanks,
Chris
