I don't know if this will help you or not, but here's some code I wrote to break each part of the IP address in to a variable. I think it might make things easier.

; Calculates which octet/site the users is logging in from.
$OCT1 = LTRIM(substr(@ipaddress0,1,3))
$OCT2 = LTRIM(substr(@ipaddress0,5,3))
$OCT3 = LTRIM(substr(@ipaddress0,9,3))
$OCTTOTAL = $OCT1+$OCT2+$OCT3

Here's how I use that code later on in my script:

IF INSTR ("$OCTTOTAL", "1020212") OR INSTR ("$OCTTOTAL", "102020")

[ 27 March 2002, 18:41: Message edited by: MikeT ]