Susan,
 
The ^ is an anchor used in pattern matching.  It is used to anchor the
match to the first character.  In this case it should not allow single
digit values.  The 6th line would not allow values of 12. within the
string.
 
Dave

________________________________

From: Action Request System discussion list(ARSList)
[mailto:[EMAIL PROTECTED] On Behalf Of Susan Palmer
Sent: Monday, May 07, 2007 2:26 PM
To: [email protected]
Subject: Re: IP Address Pattern matching


** 
Funny this question came up ... I was in the process of reviewing the
critieria I have on numerous IP fields for checking validity.  It seems
I'm allowing .0 in the fourth octet and probably should not be.  I've
been trying to decipher what each line means.  I haven't looked up what
the carrot in line 4 means yet.  We have 15 IP fields I have to
validate. 
 
I had been given the following Run IF and have been using it in filters.
 

( 'Subnet' !=  $NULL$ ) AND 

(NOT (( 'Subnet' LIKE  "[0-9]%.[0-9]%.[0-9]%.%[0-9]" ) AND 

(NOT ( 'Subnet' LIKE  "%.%.%.%.%" )) AND 

(NOT ( 'Subnet' LIKE  "%[^0-9.]%" )) AND 

(NOT ( 'Subnet' LIKE  "%[0-9][0-9][0-9][0-9]%" )) AND 

(NOT ( 'Subnet' LIKE  "%[^12.][0-9][0-9]%" )) AND 

(NOT ( 'Subnet' LIKE  "%25[6-9]%" )) AND 

(NOT ( 'Subnet' LIKE  "%2[6-9][0-9]%" )) AND 

(NOT ( 'Subnet' LIKE  "%.0[0-9]%" )) AND 

(NOT ( 'Subnet' LIKE  "0[0-9]%" )) AND 

(NOT ( 'Subnet' LIKE  "0.0.0.0" ))))

 

Susan



 
On 5/7/07, Thad K Esser <[EMAIL PROTECTED]> wrote: 

        ** 
        There was a discussion about IP Validation last June.  Search
the archives for messages with the subject line: "Need IP Validation
workflow from ITSM 5.6" 
        
        Thad Esser
        Remedy Developer
        "Argue for your limitations, and sure enough, they're yours." --
Richard Bach 
        
        
        
"Durrant, Michael M. - ITSD" <[EMAIL PROTECTED] > 
Sent by: "Action Request System discussion list(ARSList)" <
[email protected] <mailto:[email protected]> > 

05/04/2007 10:52 AM 
Please respond to
[email protected]


To
[email protected] 
cc
Subject
Re: IP Address Pattern matching 

                


        
        
        
        Thanks for the suggestions Joe and Axton - I think I'm going to
take the
        display-only fields route and concatenate that.
        
        Another (much more complex) idea I had was creating a filter API
plugin 
        that would provide either a) specific content-based formatting
or b)
        standard regular expressions.  If AR System had "standard" (as
opposed
        to their hack of an implementation) regex capabilities, I would
be very 
        very very happy.
        
        
        Michael Durrant
        [EMAIL PROTECTED]
        Share what you know.  Learn what you don't. 
        
        
        
        
        -----Original Message-----
        From: Action Request System discussion list(ARSList)
        [mailto: [email protected] <mailto:[email protected]> ] On
Behalf Of Axton
        Sent: Friday, May 04, 2007 10:52 AM
        To: [email protected] 
        Subject: Re: IP Address Pattern matching
        
        You could also parse the char value and write each octet to an
integer
        field, in which case testing the limits becomes much easier.
Each octet
        is an 8-bit value, comparative operations against an integer for
this 
        type of data is much easier with a data type that easily
represents the
        true value.  A 3 character string is really 24-bit for single
byte
        characters and up to 48-bit for double-byte characters...
        This is not the best way to store the data to test it the way
you want. 
        Although, if you converted the represented 8-bit value from a
string
        into a character, you could easily test it.
        
        Axton Grams
        
        On 5/4/07, Joe D'Souza < [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> > wrote:
        > I didn't think of the 000 possibility.. I guess besides
checking the 
        > length, if you use the solution I suggested earlier, you would
need to
        
        > check these possibilities too and eliminate them.. and then 
        concatenate the 4 values..
        >
        > Also make sure you think ahead for IP6 and make allowances for
that
        too..
        >
        > Joe
        >
        > -----Original Message-----
        > From: Action Request System discussion list(ARSList) 
        > [mailto:[EMAIL PROTECTED] Behalf Of Axton
        > Sent: Friday, May 04, 2007 12:37 PM
        > To: [email protected]
        > Subject: Re: IP Address Pattern matching
        >
        >
        > Not only that, you could enter 900.999.123.000.
        >
        > There are perl libraries that are very good at this.  If you
don't 
        > want to go that route, you could parse the octets into
separate 
        > fields, then check those.  There was also a thread a couple of
months 
        > back that had a very very long qual that could be used to
evaluate the
        
        > value.
        >
        > Axton Grams
        >
        > On 5/4/07, Durrant, Michael M. - ITSD < [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> > wrote:
        > > **
        > >
        > > Anyone have suggestions for matching an IP address pattern
        > (###.###.###.###)
        > > in a Character Field?  I could use
        > >
[0-9][0-9][0-9].[0-9][0-9][0-9].[0-9][0-9][0-9].[0-9][0-9][0-9] 
        > > - but then I have to enter the address as 010.010.001.001
<http://8.8.1.1/> .
        > >
        > > Thank you for your time, 
        > >
        > > Michael Durrant
        > > IT Systems Integration Analyst
        > > Division of Information Technology
        > > Idaho Department of Health and Welfare Share what you know.
Learn 
        > > what you don't. 
        > > ----------------------------------------------------------
        > >
        > >
        > >
        > >
        > >   The information contained in this email may be privileged,

        > > confidential 
        > or
        > > otherwise protected from disclosure.  All persons are
advised that 
        > > they
        > may
        > > face penalties under state and federal law for sharing this 
        > > information 
        > with
        > > unauthorized individuals.  If you received this email in
error, 
        > > please
        > reply
        > > to the sender that you have received this information in
error.  
        > > Also, please delete this email after replying to the sender.

        > > __20060125_______________________This posting was submitted
with 
        > > HTML in it___
        >
        >
______________________________________________________________________
        > ______
        > ___
        > UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
<http://www.arslist.org/>  
        > ARSlist:"Where the Answers Are" 
        >
        > No virus found in this incoming message.
        > Checked by AVG Free Edition.
        > Version: 7.5.467 / Virus Database: 269.6.2/787 - Release Date:

        > 5/3/2007 2:11 PM
        >
        > No virus found in this outgoing message. 
        > Checked by AVG Free Edition.
        > Version: 7.5.467 / Virus Database: 269.6.2/787 - Release Date:

        > 5/3/2007 2:11 PM
        >
        >
______________________________________________________________________ 
        > _________ UNSUBSCRIBE or access ARSlist Archives at
www.arslist.org <http://www.arslist.org/>  
        > ARSlist:"Where the Answers Are" 
        >
        
        
________________________________________________________________________
        _______
        UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
<http://www.arslist.org/>  ARSlist:"Where
        the Answers Are"
        The information contained in this email may be privileged,
confidential or otherwise protected from disclosure.  All persons are
advised that they may face penalties under state and federal law for
sharing this information with unauthorized individuals.  If you received
this email in error, please reply to the sender that you have received
this information in error.  Also, please delete this email after
replying to the sender. 
        
        
________________________________________________________________________
_______
        UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
<http://www.arslist.org/>  ARSlist:"Where the Answers Are"
        
        
        

        ***IMPORTANT NOTICE: This communication, including any
attachment, contains information that may be confidential or privileged,
and is intended solely for the entity or individual to whom it is
addressed. If you are not the intended recipient, you should delete this
message and are hereby notified that any disclosure, copying, or
distribution of this message is strictly prohibited. Nothing in this
email, including any attachment, is intended to be a legally binding
signature.*** 
        

        __20060125_______________________This posting was submitted with
HTML in it___


__20060125_______________________This posting was submitted with HTML in
it___ 

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

Reply via email to