You need to somehow fix the lookahead, because if it moves, you can miss the 'fail if match' part, and it might also be a good idea to put the class='lazy'
in a lookahead as well, and you could perhaps do it like this:
<img(?=[^>]*class\s*=\s*(["'])lazy\1)(?![^>]*data-original)[^>]*>
That way, you don't have to worry about the order data-original
and class='lazy'
appear either.