rereplace(thetrace, '[^0-9.]', '', 'all') will replace everything
that's not the actual IP

then you can just use listGetAt(theTrace, 3, '.') and
listGetAt(theTrace, 4, '.')

On Nov 2, 2007 9:23 AM, Orlini, Robert <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I have an IP address as a string and am trying to display just the last two 
> octets. For example, if the string contains "[192.29.100.100]", I want to 
> display just the "100.100" without brackets. I used the mid function as:
>
> <CFSET bracket = '#find("[",thetrace)#'>
>
> <cfoutput>#mid(thetrace,bracket,15)#</cfoutput>
>
> ("thetrace" is the text file and 15 characters or all the "[192.29.100.100]")
>
> I tried:
> <CFSET ipaddress = '#find(".29.",thetrace)#'>
> <cfoutput>#mid(thetrace,ipaddress,7)#</cfoutput>
>
> but get: .29.13.
>
> Thanks.
>
> RO
> HWW
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Get involved in the latest ColdFusion discussions, product
development sharing, and articles on the Adobe Labs wiki.
http://labs/adobe.com/wiki/index.php/ColdFusion_8

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292551
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to