I have worked with the regexp command in 8.4+ version of TCL. It has many convenient switches and is closer to the standard regular expression syntax that is in use. When I tried to access the same scripts with Jacl - I get the error saying only -nocase is the only supported switch - this is about 6 years old. We need support for all the switches (-inline, -lineanchor, -linestop, -all etc). I have traced it to the Regex class that is being used - which is sunlabs.brazil.util.regexp.Regexp class - which again is obsolete.
Here are the switches that I am talking about:
http://www.tcl.tk/man/tcl8.3/TclCmd/regexp.htm
This is the exception string that I get on evalFiling the tcl script:
bad switch "-all": must be -indices, -nocase, or -- The failure is at:
foreach {login} [regexp -nocase -all -inline -lineanchor -- {^login.+?\n\}} $fileContent] {
of the script.
- Sanjeev
Logged In: YES
user_id=90858
Originator: NO
Jacl supports the older regexp syntax, pre-8.3. It should be possible to
upgrade both the regexp switches and syntax, but it is going to be quite
a bit of work to upgrade to the new Java regexp engine in 1.4.