updated regex engine, for better compelx html matching
refactored regexp