11-30-2013, 05:30 PM
<div>Hi,</div>
<div> </div>
<div>Assuming I'm reading this correctly, you want to strip the tags surrounding the <img> tag, right? If that's the case, then you really only need to capture the <img> tag.</div>
<div> </div>
<div>This particular regular expression may do what you want...note that this uses a quick and dirty method of picking up html tags, and would fail if there were another ">" character inside the tag.</div>
<div>
<pre class="_prettyXprint">
<p[^>]*>(<img[^>]+\/>)<\/p></pre>
If this doesn't quite work for you, then you may want to try experimenting with http://regexpal.com/ ...I've found the highlighting to be quite helpful.
</div>
<div>Hopefully that helped. </div>
<div> </div>
<div>Assuming I'm reading this correctly, you want to strip the tags surrounding the <img> tag, right? If that's the case, then you really only need to capture the <img> tag.</div>
<div> </div>
<div>This particular regular expression may do what you want...note that this uses a quick and dirty method of picking up html tags, and would fail if there were another ">" character inside the tag.</div>
<div>
<pre class="_prettyXprint">
<p[^>]*>(<img[^>]+\/>)<\/p></pre>
If this doesn't quite work for you, then you may want to try experimenting with http://regexpal.com/ ...I've found the highlighting to be quite helpful.
</div>
<div>Hopefully that helped. </div>