Hi, I have a regex expression

/\.(\/Directory_Files\/.+)"/

This looks for anything with the string: ./Directory_Files/"

The problem is it is only finding the first instance of this string within the information I am importing. I am trying to have it change all instances. If I had access to the global flag then it would look like this and everything would work fine:

/\.(\/Directory_Files\/.+)"/g

Comments

twistor’s picture

Title: Allow Global Flag - Regex Replace all Instances » Add "Relace All" option to Regex Find Replace.
Version: 7.x-1.0-beta5 » 7.x-1.x-dev
Issue summary: View changes
Priority: Major » Normal

PHP doesn't have the g modifier. We have to use preg_replace_all() instead.