Fun stuff here.

To find the index of the second period:

$IP$ = 126.0.0.1
$FirstOct$ = STRSTR($IP$, .)
$TmpIP$ = SUBSTR($IP$, $FirstOct$)
$SecondOct$ = STRSTR($TmpIP$, .)

Nested:

$SecondOct$ = STRSTR((SUBSTR($IP$, (STRSTR($IP$, .)), .)    [I think]

Now, to mask, you can simply set a field to SUBSTR($IP$, 0, $SecondOct$) and 
it will just show the first two octets. You might have to add or remove 1 on 
some of the SUBSTR commands.

SO, total, nested would be:

'ShownIP' = SUBSTR($IP$, 0, (STRSTR((SUBSTR($IP$, (STRSTR($IP$, .)), .)))

And again, you might need to add or subtract 1 here and there.


Thanks,


Gary Opela, Jr

Sr. Remedy Developer

Leader Communications, Inc.

405 736 3211

-----Original Message-----
From: Action Request System discussion list(ARSList) 
[mailto:[EMAIL PROTECTED] On Behalf Of Joran, Peter P, CTR, OSD-CIO
Sent: Monday, December 10, 2007 9:00 AM
To: arslist@ARSLIST.ORG
Subject: How to partially mask a field

All

I need to mask the first two octets of our IP addresses. It gets a little 
complicated as an IP address length varies. For example an
IP address could be 1.1.1.1 or 123.123.123.123. Is there a way to do a SUBSTR 
type of function that can start after the second "."?
I'm trying to avoid reformatting the address to eventually get what I want.

Then again if I'm going about this the wrong way I'm open to thoughts.

Best Regards
Pete

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor: www.rmsportal.com ARSlist: "Where the Answers Are"

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor: www.rmsportal.com ARSlist: "Where the Answers Are"

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to