Einzelnen Beitrag anzeigen

Benutzerbild von himitsu
himitsu

Registriert seit: 11. Okt 2003
Ort: Elbflorenz
44.184 Beiträge
 
Delphi 12 Athens
 
#1

RegEx via API?

  Alt 1. Mär 2010, 12:31
Ich bin grad in der Unit NSAPI.pas über etwas etwas gestolpert.

Mich hatte eigentlich nur mal interessiert, ob Delphi da auch etwas dabei hat, bzw. ob man da irgendwo sowas findet, denn immerhin bietet doch die IDE in der Suchfunktion auch etwas?

Delphi-Quellcode:
{*******************************************************}
{                                                       }
{                Delphi Runtime Library                 }
{                                                       }
{ Copyright(c) 1995-2010 Embarcadero Technologies, Inc. }
{                                                       }
{*******************************************************}

{*******************************************************}
{       Structure definitions and prototypes for the    }
{       Netscape Internet Server API (NSAPI)            }
{*******************************************************}

{*****************************************************************************}
{* From shexp.h                                                               }
{*****************************************************************************}
{
  Defines and prototypes for shell exp. match routines


  This routine will match a string with a shell expression. The expressions
  accepted are based loosely on the expressions accepted by zsh.

  o * matches anything
  o ? matches one character
  o \ will escape a special character
  o $ matches the end of the string
  o [abc] matches one occurence of a, b, or c. The only character that needs
          to be escaped in this is ], all others are not special.
  o [a-z] matches any character between a and z
  o [^az] matches any character except a or z
  o ~ followed by another shell expression will remove any pattern
      matching the shell expression from the match list
  o (foo|bar) will match either the substring foo, or the substring bar.
              These can be shell expressions as well.

  The public interface to these routines is documented below.
}


{* --------------------------- Public routines ---------------------------- *}

{
  shexp_valid takes a shell expression exp as input. It returns:

  NON_SXP      if exp is a standard string
  INVALID_SXP  if exp is a shell expression, but invalid
  VALID_SXP    if exp is a valid shell expression
}


const
   NON_SXP = -1;
   INVALID_SXP = -2;
   VALID_SXP = 1;

{* and generic shexp/regexp versions *}
   NON_WILDPAT = NON_SXP;
   INVALID_WILDPAT = INVALID_SXP;
   VALID_WILDPAT = VALID_SXP;

{* and regexp versions *}
   NON_REGEXP = NON_SXP;
   INVALID_REGEXP = INVALID_SXP;
   VALID_REGEXP = VALID_SXP;

function shexp_valid(exp: PAnsiChar): Integer; cdecl;

{
  shexp_match

  Takes a prevalidated shell expression exp, and a string str.

  Returns 0 on match and 1 on non-match.
}

function shexp_match(str, exp: PAnsiChar): Integer; cdecl;

{
  shexp_cmp

  Same as above, but validates the exp first. 0 on match, 1 on non-match,
  -1 on invalid exp. shexp_casecmp does the same thing but is case
  insensitive.
}

function shexp_cmp(str, exp: PAnsiChar): Integer; cdecl;
function shexp_casecmp(str, exp: PAnsiChar): Integer; cdecl;
Dazu noch was Kleines von MS:
http://support.microsoft.com/kb/274204/de
http://support.microsoft.com/?scid=kb%3Ben-us%3B274204

Sooo, nun hab ich hier auf'm Rechner natürlich keine ns-httpd20.dll gefunden, in welcher sich dieses verstecken soll.

Täucht das nun oder ist dieses NSAPI (Netscape Server Application Programming Interface) nur in einem ServerOS vorhanden, bzw. nur wenn z.B. ein Sun Java System Web Server oder Zeus Web Server installiert ist?

Hab jedenfalls nicht viele Informationen gefunden, nur daß eben seit 'ner Weile, die oben genannten Serversysteme, diese API implementiert haben.
http://docs.sun.com/app/docs/doc/820...kc?l=de&a=view
$2B or not $2B
  Mit Zitat antworten Zitat