I have a huge string in PHP. In it are many url strings such as:
background: #9dc9de url("@{base-url}/img/background.jpg") center top no-repeat;
What is the best method to go through the entire string, find any url strings and insert a hash code before the extension based on the current timestamp to get a result such as:
background: #9dc9de url("@{base-url}/img/background_013857308.jpg") center top no-repeat;
I'm currently trying to explode based on a few parameters but it's definitely not a clean idea.