I'm currently validating a variant of the following HTML
<img> tag we're receiving from one of our customers:
<img src="http://www.client_website.com.au/new/images/client_logo.gif" height="251" width="285" alt=""Client Logo/>For tags like this, I need a regexp that will provide a match if any of the following conditions are satisfied:
1. The height attribute is greater than 250.
2. The height attribute is zero.
3. An empty height attribute has been supplied, i.e. height="" or height=''.
4. A decimalised height attribute size has been provided, e.g. height="107.7".
I've come up with the following Regular Expression to match these requirements, having borrowed part of it from the solution Doug Drudik provided to my last question

:
(<img\b[^>]*)(height=(((['"]?)((([0-9][0-9][0-9][0-9]))|([2-9][5-9][1-9])|(\d+\.\d+)|0)(['"]?))|(''|"")))([^>]*/?>)Beautiful, isn't it..........................

It seems to work, but as I'm very new to writing involved expressions like this, I'm wondering if there is a simpler solution? It wouldn't surprise me if there is a more elegant way to accomplish this. Does anyone have a 'cleaner' alternative expression that would accomplish the same as this one?