GET IT AT: ftp://ftp.neosoft.com/pub/tcl/incoming/nre20.tar.gz It should soon be in: ftp://ftp.neosoft.com/pub/tcl/sorted/unknown/nre20.tar.gz or: http://www.newsoft.com/tcl/ftparchive/sorted/unknown/nre20.tar.gz INTRODUCTION The nre (new regular expression) package is a superset of the standard Tcl regular expression engine. You should find that your old regular expression match faster if you use nre. It also has a number of new features in the regular expression language described in the nrematch man page. Most all of the Perl 5.0 regular expression features are available. It is binary clean so you can have NULL bytes in your regular expression and/or the text being matched. It requires Tcl8.0 because it uses the Tcl 8.0 object system to represent a regular expression. It provides the following commands: nrematch (i.e. regexp) nresub (i.e. regsub) nrelsearch (i.e. lsearch) nreswitch (i.e. switch) nredump nreuse nresplit The nresub command has a new -eval switch inspired by the regsube command. The nrematch command has a new -all switch inspired by regsub's -all switch. Nre has been built and tested on Solaris, HP, SunOS, and Windows NT 4.0 with Visual C++ 4.2. It has been purified on Solaris and a coverage tool was used to make sure that the test suite exercises most all the code. VERSION: 2.0 WHATS NEW -- Changed '@' to '\'. *** INCOMPATIBLE with 1.0 *** -- SunOS4.1 support. -- New nresplit command. See the changes file for details. LICENSING Nre is as free as Tcl. I've included Tcl's license.terms with the release to make this clear. BUILDING THE PACKAGE 1. Uncompress and unpack the distribution gzip -d nre20.tar.gz tar -xf nre20.tar This will create a subdirectory nre2.0 with all the files in it. There is a precompiled DLL built on WinNT/VC4.2/Tcl8.0 that will work with the tclsh8.0 released by Sun. Everyone else will have to configure and compile. 2. Configure cd nre2.0 ./configure --prefix=/usr/local --exec-prefix=/usr/local configure uses information left in tclConfig.sh when you built tcl. This file will be found in $exec_prefix/lib/. For Win95/NT, hack up makefile.vc until it works and compile. It is intended to build a DLL, so building a static version is left as an exercise to the user. 3. Make, test, and Install make make test make install nre is built to comply to the latest tcl package conventions except it does not use namespaces for its commands. 4. Use it Start a regular tcl interpreter, execute: package require nre and then start using the nre commands. If you want the nre commands to replace the standard Tcl regular expression commands execute: nreuse 1 You can put these two lines in the top of an existing Tcl application to see how it works for the nre package. DOCUMENTATION Man pages exist. Html version of the man pages are also provided in the 'hmtl' subdirectory. COMMENTS, BUGS, etc. * Please can you send comments and bug reports to darrel@gemstone.com and I'll do my best to address them. * If you find a bug, a short piece of Tcl that exercises it would be very useful, or even better, compile with debugging and specify where it crashed in that short piece of Tcl. It would be nice if the code could easily be added to the test suite. /* * current maintainer: darrel@gemstone.com */