Category : File Managers
Archive   : REGEXG11.ZIP
Filename : UNSHAR.HDR

 
Output of file : UNSHAR.HDR contained in archive : REGEXG11.ZIP
Article 2022 of comp.sources.misc:
Path: cos!hadron!decuac!shlump.nac.dec.com!news.crl.dec.com!deccrl!bloom-beacon!snorkelwacker.mit.edu!usc!cs.utexas.edu!uunet!sparky!kent
From: [email protected] (John Kercheval)
Newsgroups: comp.sources.misc
Subject: v17i069: regex - REGEX Globber (Wild Card Matching), Part01/01
Message-ID: <[email protected]>
Date: 25 Mar 91 22:01:30 GMT
Sender: [email protected] (Kent Landfield)
Organization: Sterling Software, IMD
Lines: 1146
Approved: [email protected]
X-Checksum-Snefru: eef2860b 4b30a023 e30080d9 612cca42

Submitted-by: John Kercheval
Posting-number: Volume 17, Issue 69
Archive-name: regex/part01

Here is the shar archive of V1.10 of REGEX Globber.
This is a *IX wildcard globber I butchered, hacked and cajoled together
after seeing and hearing about and becoming disgusted with several similar
routines which had one or more of the following attributes: slow, buggy,
required large levels of recursion on matches, required grotesque levels
of recursion on failing matches using '*', full of caveats about usability
or copyrights.

These routines are fairly well tested and reasonably fast. I have made
an effort to fail on all bad patterns and to quickly determine failing '*'
patterns. This parser will also do quite a bit of the '*' matching via
quick linear loops versus the standard blind recursive descent.

This parser has been submitted to profilers at various stages of development
and has come through quite well. If the last millisecond is important to
you then some time can be shaved by using stack allocated variables in
place of many of the pointer follows (which may be done fairly often) found
in regex_match and regex_match_after_star (ie *p, *t).

No attempt is made to provide general [pat,pat] comparisons. The specific
subcases supplied by these routines is [pat,text] which is sufficient
for the large majority of cases (should you care).

Since regex_match may return one of three different values depending upon
the pattern and text I have made a simple shell for convenience (match()).
Also included is an is_pattern routine to quickly check a potential pattern
for regex special characters. I even placed this all in a header file for
you lazy folks!

Having said all that, here is my own reinvention of the wheel. Please
enjoy it's use and I hope it is of some help to those with need ....

jbk
----


  3 Responses to “Category : File Managers
Archive   : REGEXG11.ZIP
Filename : UNSHAR.HDR

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/