0

I have a preg_replace function that replaces the first match of NUMBERxNUMBER in a sring. I need it to replace only the last match and i can't figure it out.

preg_replace("#-\d+x\d+#", "",  $string, 1)

I tried putting a $ before the # but doesn't work...

Thank you.

Andrei
  • 121
  • 15

0 Answers0