Isaac, unfortunately, your regex doesn't work, your description of how it
should work is inaccurate, and even if it did work as you described, the
text being searched for would have to appear within the first table row.
This should work:
REFindNoCase("<table[^>]*>(?:.(?!</table>))*?Code 2",tmpHTML)
-----Original Message-----
From: s. isaac dealey [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 15, 2007 7:40 PM
To: RegEx
Subject: Re: trouble scraping tables
Given that the first suggestion didn't work, my suggestion would be:
REFindNoCase("<table[^>]*>\s*<tr[^>]*>(!</tr>).*<td>Code 2</td>",tmpHTML)
Note that this won't work with CF version 5 -- negative lookahead and I
think \s weren't introduced until CF6. This expression says find the
table, let there be any attributes in the table tag, let there be space
before the first row, let there be any attributes inside the row tag,
and make sure there's a td containing "code 2" somewhere within the open
and closing row tags. The negative lookahead in this case is forcing the
expression to examine only the portion from the opening table tag to the
closing </tr> of the first row.
hth
--
s. isaac dealey 512.372.8890
Archive:
http://www.houseoffusion.com/groups/RegEx/message.cfm/messageid:1025
Subscription: http://www.houseoffusion.com/groups/RegEx/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=27280.19570.21
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7
The most significant release in over 10 years. Upgrade & see new features.
http://www.adobe.com/products/coldfusion?sdid=RVJR
Archive: http://www.houseoffusion.com/groups/RegEx/message.cfm/messageid:1027
Subscription: http://www.houseoffusion.com/groups/RegEx/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.21