regexp for TCL 8.0

From: Phil Biehl (fylbeall_at_yahoo.com)
Date: 10/29/04


Date: Fri, 29 Oct 2004 14:57:33 -0700

I'm having to convert some TCL 8.4 code down to the 8.0 version and am
having difficulty with an RE that works fine in 8.4 but fails in 8.0. I'm a
little embarassed because this seems simple but I can't seem to find an
answer that works.

I have a string that is in the form of: aaaa,1234,5678

I want to pick out the middle integer, 1234.

My code of the 8.4 persuasion looks like this: regexp {,(\d+),} $a b c
where $a is aaaa,1234,5678.

I'm assuming that \d is not supported in 8.0 as a decimal digit. What will
make this work in 8.0?

Also, is there a RE reference I can get that will explain the syntax ass it
pertains to 8.0? I know about the manpage at:
http://www.tcl.tk/man/tcl8.0/TclCmd/regexp.htm

Thanks!
Phil



Relevant Pages

  • Re: create a single self-contained standalone expect binary on solaris 8
    ... Build and install it. ... as step 5 fails on the package ... Are you looking for prebuilt binaries? ... which includes Solaris binaries for Tcl that has Expect. ...
    (comp.lang.tcl)
  • Re: fsck - BAD SUPER BLOCK: MAGIC NUMBER WRONG
    ... this is the first time I've ever used it) fails to find anything ... untoward, and neither do fsck_hfs and DiskUtility. ... The manpage for fsck_hfs says that "it is normally started by fsck ... ...
    (uk.comp.sys.mac)
  • Re: A patch to man to handle "man.1"...
    ... > 1) first check to see if there's a manpage for the literal argument ... > 2) if that fails, treat the trailing digit as a section ... seems like this is a useful syntax to add ... scratch rather than try to make non-localized/extensive changes to the existing ...
    (freebsd-stable)
  • Re: winter and summer time confusion in clock and tcl 8.4.12 and 8.5a4 (starpack)
    ... This seems to be documented in the Tcl 8.5 clock scan manpage: ... Daylight savings time correction is applied only when the relative time ...
    (comp.lang.tcl)
  • Re: ifconfig_IF_aliasX regression
    ... least the manpage gives something like this as an example), ... fails, or that it is not documented in UPDATING. ... I already expected that this is some regression because of the IPv6 changes, ... If yes -> missing UPDATING entry. ...
    (freebsd-current)