Dear team,
I am facing difficulties to validate the below format. I want regular expression needs to be satisfied with the below condtion.
$pattern = '/^\w[\w\s\.\%\-\(\)\[\]]*$/u';
$file_name = "(00)filename.jpg";
if(preg_match($pattern,$file_name)){
echo "Pattern matched";
}else {
echo "Pattern not matched";
}
I have tried several ways. But, the main problem is do not write the own pregmatch, instead need to modify the existing one which accepts the brackets().
Thanks,
Prem