Hey guys,
If I have a general regex pattern such as '/([a-x])([a-z])/'...
Is it possible to have a replacement dependant on the back reference?
Or to do an individual replacement depending on the number of the match found?
For example: if \1 was "sausage", then replacement had to be "noodle", but if \1 was "noodle", the replacement had to be "pie".
How ineffective is it to a preg_replace with patterns for each individual case of the back references?
Thanks!