There's a few things you could do, based on the consistency of the source
string:

1) Are the 3 lines always separated by a line break?
2) Is each line always separated by an = sign?

If so, then you could do this like so:


<!--- save the string into a var, just for testing --->
<cfsavecontent variable="string">
a=
b=tyweu8939skdksspdssdsd
c=sd
</cfsavecontent>
<cfset repString = 'z'>

<!--- gives you the second line --->
<cfset tmp = REReplaceNoCase(ListGetAt(string,2,Chr(10)), '^[[:alpha:]]',
repString)>

<!--- dump the results --->
<cfdump var="#VARIABLES#">
<cfabort>



-----Original Message-----
From: Don L [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 13, 2008 11:11 AM
To: cf-talk
Subject: Any regular expression guru here?

What I'd like to want to do is to replace a value from a simple text which
looks like this:
a=
b=tyweu8939skdksspdssdsd
c=sd

How do I replace the value of b when the b value is unknown?

Thanks.






~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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/cf-talk/message.cfm/messageid:315222
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to