Title should say it all, if not let me know and I will update the question.
The code
TYPE=('html?' 'jsp' 'php')
TYPE=$(printf "|%s" "${TYPE[@]}")
## will not except paths with spaces
for file in $(find -E * -type f -iregex ".*(${TYPE:1})") ; do
echo $file
done
While trying to wrap it
## command substitution: line ~: syntax error near unexpected token `('
## command substitution: line ~: `find -E * -type f -iregex \".*(${TYPE:1})\")"'
for file in "$(find -E * -type f -iregex \".*(${TYPE:1})\")" ; do
echo $file
done