> -----Original Message----- > From: Axel Glorieux [mailto:[EMAIL PROTECTED] > Sent: Tuesday, January 11, 2005 7:45 PM > To: RegEx > Subject: Re: Any character, any character at all. > > >>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.
Thanks, I didn't mean that the process was impossible - just the setting to make the RegEx non-greedy. I'm actually all-too-well familiar with having to work around this - we're still on CF 4.5 at the office. ;^) Jim Davis ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Get help! RoboHelp http://www.houseoffusion.com/banners/view.cfm?bannerid=58 Message: http://www.houseoffusion.com/lists.cfm/link=i:21:815 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
