given string: $code = "123-345-678" and I want to make it: 123/345/678
I know you can do it by exploding and imploding. But I wonder if it is possible to make it in pure regex. So it will be returned as a value in array from preg_match ?
you could do it with preg_replace(), but str_replace() would be faster