I would like to have your opinion on a simple regular expression I built to verify a list of comma separated file extensions (there could also be one or multiple spaces after or before the comma character).This regular expression should return the following values:\[code\]$list = 'jpg,png,gif'; // valid$list = 'jpg , png, gif'; // valid$list = 'jpg'; // valid$list = 'jpg, png, gif'; // valid$list = 'jpg png, gif'; // INVALID$list = 'jpg png'; // INVALID\[/code\]I am using the regular expression below, what do you think of it? can it optimized or shortened?\[code\]if(!preg_match( '#^[0-9a-zA-Z]+([ ]*,[ ]*[0-9a-zA-Z]+)*$#' , $list)){ echo 'invalid extension list';} else{ echo 'valid extension list';}\[/code\]Thanks for your good advices