Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

regexp for TCL 8.0

0 views
Skip to first unread message

Phil Biehl

unread,
Oct 29, 2004, 5:57:33 PM10/29/04
to
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


Gerry Snyder

unread,
Oct 29, 2004, 6:06:00 PM10/29/04
to
Phil Biehl wrote:
> ....

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

[0-9]

0 new messages