with the caveat that i'm no regex guru either (which will become
abundantly clear when you see my code below)... you should be able to
capture the 'name' attribute of the input element using backreferences
and then spit out the value.
here's what i have so far, which unfortunately doesn't work... but
might lead you in the right direction. unfortunately, i don't have
too much time to play around with it more. gotta catch a flight in a
couple of hours.
<cfparam name="form.firstname" default="bob" />
<cfsavecontent variable="ContentBlock">
<form>
<input type="text" name="firstname">
</form>
</cfsavecontent>
<cfset NewContentBlock =
#REReplace(ContentBlock,'<input[^>]*name=\"(.*?)\"*>',"form[\1]","all")#>
<cfset NewContentBlock = #REReplace(NewContentBlock,"<form[^>]*>","","all")#>
<cfset NewContentBlock = #REReplace(NewContentBlock,"</form[^>]*>","","all")#>
<cfoutput>#newContentBlock#</cfoutput>
what i'm unable to do... which seems to be the key here, is getting
form[firstname] (which should actually have quotes around the
'firstname') to evaluate to "bob". i've tried a few combinations
(including "#form['\1']#" in the rereplace), but haven't had any luck
:\
--
Evelyn the dog, having undergone further modification pondered the
significance of short-person behaviour in pedal depressed,
pan-chromatic resonance, and other highly ambient domains. "Arf," she
said.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301753
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4