Regex

This regex matches image tags with a bunch of optional attributes in any order but a defined src:

<img ?((width|height|class|alt|target|img|title)="?([a-zA-Z.0-9_ &–-]+)?")? ?((width|height|class|alt|target|img|title)="?([a-zA-Z.0-9_ &–-]+)?")? ?((width|height|class|alt|target|img|title)="?([a-zA-Z.0-9_ &–-]+)?")? ?((width|height|class|alt|target|img|title)="?([a-zA-Z.0-9_ &–-]+)?")? src="http://assets.cagrimmett.com/cag/mt_asset_cache/?([a-zA-Z0-9._/-]+)?" ?((width|height|class|alt|target|title)="?([a-zA-Z.0-9_ &–-]+)?")? ?((width|height|class|alt|target|title)="?([a-zA-Z.0-9_ &–-]+)?")? ?((width|height|class|alt|target|title)="?([a-zA-Z.0-9_ &–-]+)?")? ?((width|height|class|alt|target|title)="?([a-zA-Z.0-9_ &–-]+)?")? ?((width|height|class|alt|target|title)="?([a-zA-Z.0-9_ &–-]+)?")??( ?/)?>

Useful tool for writing regex tests: https://regexr.com/3dvqn