>>If you want to only grab the first paragraph you need to set the regex to be 
>>"not greedy".  It escapes me how to do that in CFMX (which uses Java 
>>RegExes), but unfortunately this just couldn't be done in CF before MX.


Thats not quite true, it's just a bit trickier.

str = "<p><b>hello</b></p><p>goodbye</p>"

RE = "<p[^>]*>([^<]|<[^/]|</[^p])+</p>"

Using this you can loop to REFindNoCase every <p> tag in a string provided that 
they're not nested. This should work with CF5.

This is for those poor souls who for some reason must stick to a version prior 
to MX ;)







~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:21:814
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/21
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:21
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.21
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to