links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
Last updated at 10:27 pm UTC on 8 December 2006
RePlugin (version 2.3b) is a Perl-Style Regular Expression engine plugin for Squeak. This provides facilities for compiling, searching and matching Perl 5-style regular expressions against arbitrary text, and is a somewhat more current version of the same GPL'd library used in Python. Ports have been made to Macintosh (PPC), Wintel and HP-UX platforms, and the plugin is now believed in condition for easy porting to most new platforms. –Andrew Greenberg.

Executables, source codes and excellent documentation (online and downloadable) are now available at:


In response to the virtually unanimous comments regarding 2.3a, revision 2.3b now substantially improves the interface to the Regex engine with an efficient and straightforward set of messages that mostly operate on the subject string, as in the present match: message.

sourceString reMatch: pattern [from: from] [to: to] [opt: oStr]

for direct matching;

sourceString reMatch: pattern [opt: oStr] collect: aBlock [num: num]

for global matching without substitution; and

sourceString reMatch: pattern [opt: oStr] sub: aBlock [num: num]


patString asRePattern
patString asRePatternOpt: oStr
patString asRePatternOpt: oStr onErrorRun: aBlock

to return an object encapsulating the compiled regular expression for efficient matching in an inner loop.

can now be either a string or a pre-compiled pattern. The compiler routinly caches the last dozen or so strings for speedy matching without recompilation, particularly in loops using only a few patterns. String substitution was revised for a substantial speedup.

A summary of changes follows:

Version 2.3b
Substantially revise String convenience messages to serve as primary user interface to RePlugin.
Implement pattern compile caching.
Implement pattern match default caching.
Order of magnitude performance improvement in global substitution routines.
Implement modern Perl5 semantics for global matching and replacement.
Minor bug fixes.
Permit use of compiled patterns as reMatch: parameter.
Plugin code changed so that semantics for '\n' and '\r' are hard-coded across all plugins to conform to Squeak standards regardless of variations in local hardware c libraries.
Plugin code memory management scheme modified to permit compilation on most non-Macintosh systems.
Plugin code changed to automatically incorporate RePlugin class comment in the generated plugin header.
Release Wintel Plugin
Release HP-UX Plugin

Version 2.3a – Release MacPPC Plugin.

Thanks very much to everyone who reviewed and commented on 2.3a, and thanks in particular to Markus Kohler and Stephen Pair for assistance with the ports.