March 18th, 2009, 09:32 PM
PHP, Regex and multiple html edits
What i am trying to do is to edit multiple html pages with a php script. However what i do not know is how to implement Regex to do what i need.
onclick="tag'such and such"
i need to parse the DOM and add '; before the "
onclick="tag'(.*?)" search finds even those that do not require changes due to the generality of the (.*?) command.
how can i find all the ones that do not have '; and replace with preg_replace .
Assistance highly appreciated
March 20th, 2009, 08:30 AM
Welcome to Dev Shed.
Thread moved from PHP to the "new" Regex ...
Explain your problem instead of asking how to do what you decided was the solution.
March 21st, 2009, 12:16 AM
Would be better to fix your expression instead of trying to throw another one at it.
What expression/code do you have?