Optimized code

Removed preg_* :-)