I am using SobiPro, a directory system for joomla and I have a field that will have values that contain alphanumerics and hyphens only, so a sample of what might be in this text field would be:
Toy Kites, Plastic Wheels, 1-Way Gizmos, Metal Spools, 3M Wire Ties
This regex would validate what they enter on the form prior to a field save.
I thought this: (w+)(,s*w+)*
But clearly I am not right, and it does not account for the hyphens.. any help! thanks!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…