ietf-openproxy
[Top] [All Lists]

Re: Regular Expressions (Fw: PCIMe MATCHing and more)

2001-07-31 09:50:30

In draft-beck-opes-irml-01.txt I see:

 The "matches" attribute specifies the pattern against which the
 property value MUST be matched by the rule engine on the
 intermediary device. The "matches" pattern MUST be a regular
 expression compliant with the regular expression syntax as defined
 in [9].

 9  ISO/IEC DIS 9945-2:1992, Information technology - Portable 
    Operating System Interface (POSIX) - Part 2: Shell and Utilities  
    (IEEE Std 1003.2-1992); X/Open CAE Specification, Commands and 
    Utilities, Issue 4, 1992 

I recall that are two types of regular expression matching in [9],
"basic" and "extended".  You will either need to specify which one,
(e"xtended" I assume) or allow the non-default one with another
attribute like the "case-sensitive" attribute.  Anyone who uses a
POSIX compliant regexp library will be able to trivially implement
both.

You could even go so far as the have a "MatchAlgorithm" attribute
which takes values like "basic" and "extended" and possibly more
options like "glob" (i.e., fnmatch(3)), "prefix", "suffix" or even
"ISO-16262", "perl5".  They could also be be done by using a
different attribute names too.  E.g.,

  <property name="Host" suffix matches=".de">

I long time ago Lee Rafalow also wrote something I liked:

FYI and consideration...
----- Original Message -----
From: "Larry S. Bartz" 
<lbartz(_at_)parnelli(_dot_)indy(_dot_)cr(_dot_)irs(_dot_)gov>
To: "Lee Rafalow" <rafalow(_at_)raleigh(_dot_)ibm(_dot_)com>; "IETF Policy WG 
LIST"
<policy(_at_)raleigh(_dot_)ibm(_dot_)com>
Sent: Wednesday, March 28, 2001 8:27 AM
Subject: Re: PCIMe MATCHing and more

Lee Rafalow wrote:

For applications of the policy framework to any text evaluating policies
(e.g., web), regular expressions will be very useful.

See, for example,
http://www.ietf.org/internet-drafts/draft-beck-opes-irml-00.txt


I agree, Lee.

That draft cites POSIX (ISO/IEC DIS 9945-2:1992 and IEEE Std
1003.2-1992)
as the spec for regular expressions.

In my message, I cited ECMA262 (aka ISO-16262, aka ECMAscript, aka
JavaScript) as the spec for regular expressions.

The ISO-16262 regular expression syntax is directly supported in web
browser software and in readily available implementations of server-side
ECMAscript. It can be parsed and interpreted practically anywhere.

In addition, the ISO-16262 regular expression syntax is based upon
Perl 5 regular expression syntax, which in turn has its roots in
POSIX regExp, which in turn grew from C and Unix based regExp. The Perl
environemt has subsequently added functionality to regExp, so that
Perl-5/ECMA262/ISO-16262 regExp is a superset of POSIX regExp.

While POSIX regExp is certainly a stable standard, I prefer the
Perl-5/ECMA262/ISO-16262 superset, both for its enhanced capabilities
and for its widespread implementation support.
_____________________________________________________________________

Maurice Cinquini      Senior Software Engineer      Speedera Networks
_____________________________________________________________________

This message is for the named person(s) use only.  It may contain
confidential, proprietary or legally privileged information.  No
confidentiality or privilege is waived or lost by any mistransmission.
If you receive this message in error, please immediately delete it and
all copies of it from your system, destroy any hard copies of it and
notify the sender.  You must not, directly or indirectly, use, disclose,
distribute, print, or copy any part of this message if you are not the
intended recipient. SPEEDERA NETWORKS, INC. reserves the right to
monitor all e-mail communications through its network.

<Prev in Thread] Current Thread [Next in Thread>
  • Re: Regular Expressions (Fw: PCIMe MATCHing and more), Maurice Cinquini <=