Minor changes.
Made search account for special regex chars

Cleaner loop