minimize codes

it uses preg_* for parsing with minimal codes, however html parsing is better with PHP Dom classes.