Answer the question
In order to leave comments, you need to log in
How to remove a certain combination of characters from the end of a string?
Good evening.
I'm trying to figure out the preg_replace construct in order to remove a combination of characters and / or numbers at the end of the line, but I'm dumb and don't come out right away.
I thought so, but it doesn't work:
$image_name = preg_replace("/_int[-\d]$/",$image_name);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question