Need help with regular expressionhttp://forums.asp.net/t/1808004.aspx/1?Need+help+with+regular+expressionTue, 29 May 2012 05:01:06 -040018080044999549http://forums.asp.net/p/1808004/4999549.aspx/1?Need+help+with+regular+expressionNeed help with regular expression <p>Hi, guys. I have a regexp.</p> <p>Regex r = new Regex(@&quot;&lt;.*?td.*?width.*?=.*?100.*?valign.*?=.*?top.*?&gt;.*?&lt;.*?td.*?valign=.*?top.*?&gt;.*?&lt;.*?a.*?&gt;.*?(&lt;.*?img.*?src.*?=.*?&quot;&quot;(\/upload.*?)&quot;&quot;.*?&gt;)*?.*?&lt;.*?\/.*?a.*?&gt;.*?&lt;.?a.*?&gt;(.*?)&lt;.*?\/.*?a.*?&gt;.*?&lt;.*?br.*?&gt;.*?&lt;.*?br.*?&gt;(.*?)&lt;.*?span.*?class.*?=.*?catalog-price.*?&gt;(.*?)&lt;.*?\/.*?span.*?&gt;.*?&lt;.*?\/.*?td.*?&gt;&quot;, RegexOptions.IgnoreCase);</p> <p>&nbsp; I am need that regexp work correct&nbsp; if image is absent in text (image may be present or no). Now it did not work properly.&nbsp; Where is my mistake? Help me, please.</p> <p></p> 2012-05-27T21:50:04-04:005001230http://forums.asp.net/p/1808004/5001230.aspx/1?Re+Need+help+with+regular+expressionRe: Need help with regular expression <p>Hi, Regular expressions are a good way to validate text fields such as names, addresses, phone numbers, and other user information. To check whether there is image on the page, it is better to use jQuery, for example, you can add the following codes to your markup. If there is any image, you will receive an alert image exists, else, No image.</p> <pre class="prettyprint">&lt;script src=&quot;http://code.jquery.com/jquery-latest.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt; &lt;script type=&quot;text/javascript&quot;&gt; $(function () { var images = $(&quot;img&quot;); if (images.length &gt; 0) { alert(&quot;image exists&quot;); } else { alert(&quot;No image&quot;); } }); &lt;/script&gt;</pre> <p></p> 2012-05-29T05:01:06-04:00