livecheck.regex
Rainer Müller
raimue at macports.org
Sat Jun 27 03:31:20 PDT 2009
On 2009-06-20 19:51, James Kyle wrote:
> in the tclsh, the following pattern matches correctly:
>
> % set text "newmat10.tar.gz or newmat10.zip - newmat10D source files"
> newmat10.tar.gz or newmat10.zip - newmat10D source files
> % set worldlist [regexp -inline -all -- {newmat(10)\.tar\.gz or
> newmat10\.zip - newmat10D source files} $text]
> {newmat10.tar.gz or newmat10.zip - newmat10D source files} 10
> % exit
Did you use /opt/local/bin/tclsh (8.5) or /usr/bin/tclsh (8.4)?
There could be different behavior in the versions. Make sure you always
test with the system provided Tcl as that is what MacPorts uses.
> [...]
> For context, I ran into this when trying to do a lookahead match that
> excluded strings with the word "beta" in them. . . something like this:
>
> {newmat([0-9.]+).tar.gz.*(?!.*beta)}
The man page re_syntax(n) mentions such constraints, so they should work
in general...
Rainer
More information about the macports-dev
mailing list