in reply to Re^2: Conditional regex
in thread Conditional regex
Not really. Like you said so well, your real problem is
I am parsing a webpage right now to make it 508 compliant. If an IMG tag has an alt element, I need to leave it alone but if it doesn't, it needs one added
I see writing an regexp-based parser as your (broken) solution, not your problem. I'm not gonna make a lot of work for myself reinventing an HTML parser when I can skip that step and go straight to changing the HTML you want changed.
|
---|