Replacing simple preg calls with less expensive alternates

# Changes

* Replaces simple `preg_match` calls with equivalent `substr`, `strpos`, and/or `strlen` checks
* Replaces simple `preg_split` calls with equivalent `explode` operations

# Testing

* Code review, please
* No functional changes