Reply To: Regex help needed

Product Compare Forums Multi-Edit Support Regex help needed Reply To: Regex help needed


You’re right, and I believe it might be a bug that only cropped up on the examples you mentioned. I tested the regex I gave you on three HTML files I captured from three different sites, and it didn’t trip over anything, even on a captured ASP page from I’d sure have expected it to break on that last one, if it was going to break at all.

In the meantime, try this search regex as a work-around (the replace regex is the same as before):

<([A-Za-z0-9_/!][A-Za-z0-9_]@) (.@$.@)@.@>

This one worked on everything the first one did, and on your problem cases, as well. There appears to be some problem in indexing the found text in a Unix greedy match; the new expression dodges that bullet. You’ll note that as written, it will skip tags that have no attributes, but that shouldn’t be a problem, given the nature of the problem you were trying to solve to begin with.