in reply to Re^2: check in an array for variable
in thread check in an array for variable
I'd suggest splitting on /(\s*&\w+;\s*)/, then iterate over the return list and insert a "Value missing" where appropriate. That'll be much easier and more maintainable than trying to write it one regex.