I did not get any responses to yesterday's question so here it is again, rephrased.
Using ColdFusion 8's regex functionality how could I capture everything before a target property, the target property - if it exists- and everything after the target property. I can do this, when the target property exists with this regex, but this fails if the target property does not exist. <(/?)a([^>]*)(target="[^"]*")([^>]*) If I add anything to make the the target clause optional ?,*,??,*?, I get unexpected behavior. The first ([^]*) clause captures all the properties of the anchor tag including the target property. I want them separated. I've tried other methods to select everything before the target property such as just .*? but nothing I have tried has worked. P.S. this will need to work with strings that could contain multiple anchor tags and should not grab content from more then one tag. Thanks Ian ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/regex/message.cfm/messageid:1211 Subscription: http://www.houseoffusion.com/groups/regex/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.21
