php regular match doc or pdf extension
match doc or pdf extension
1212.doc
1419421.pdf
preg_match_all("|(.*).doc|U", $namelist[$j], $nn[$j]);
previously used is | (. *). Doc | U, which can only match doc,. Now I want both pdf and doc to match. How can I rewrite
?