But if he already identified a complete opening tag for the IMG, the code in there might help him break it up into attributes. Or, if he has trouble reliably finding a complete opening tag, that code might help him do that. It's not a complete parser, but a list of canned regex's doing what he asked for. And they can be further modified.