Hello, can someone please help me with this string? Right now, it will validate keywords separated by commas, lowercase only, and any two digit numbers by themselves also separated by commas. How do I further modify it to permit /up to/ two keywords, trimming any extra spaces that might be entered?
<?php if (preg_match('/^(([a-z]+|\d{1,2})\s*,\s*)*([a-z]+|\d{1,2})$/', $string)) { [do something] } else { [do something else] ?>