If you are using the Remote_Addr to pull the data the following code example
should work fine (allowing you to parse out whatever portions you need)
although I believe a port will usually show up as 10.10.10.30:5000 so you
would have to change the deliminater depending.
Hope this helps.

<cfset
ThisIP="#ListGetAt(REMOTE_ADDR,1,".")#.#ListGetAt(REMOTE_ADDR,2,".")#.#ListG
etAt(REMOTE_ADDR,3,".")# .#ListGetAt(REMOTE_ADDR,4,".")#">

<CFSET This_Port="#ListGetAt(REMOTE_ADDR,5,".")#">
-----Original Message-----
From: James Birchler [mailto:[EMAIL PROTECTED]]
Sent: Saturday, March 17, 2001 7:38 PM
To: CF-Talk
Subject: Reg Expression Parsing help...

I have never used regular expressions, and I need help parsing text of the
following format:

10.10.10.30.5000

It's an IP address with a port number, and ideally what I need is the IP
assigned to a variable and the port number assigned to another variable.

Thanks VERY much for assistance.

James
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to