I think that ($attribute*?) really should be ($attribute*), because if you have multiple attributes, the RE engine first try to match zero, then one, then two etc., instead of matching them all in the first place.
Yes, it would match them all, but that would be a bug. He doesn't want it to match the type= attribute since he's replacing it.
In reply to Re^2: Regex optimization: Can (?> ) and minimal match help here?
by ikegami
in thread Regex optimization: Can (?> ) and minimal match help here?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |