I have a huge string and somewhere in it is a part that goes “letters,numbers,numbers” and I’m trying to find that part and update the two numbers with preg_replace(). I can’t figure out the regex. Here’s what I have:
preg_replace('/'.$slug.',{0-9},{0-9}/', $slug.','.$num1.','.$num2, $mystring);
But it doesn’t work. I’m a regex noobie, can anyone help? Thanks!
try with this: