Re: New question on strings
- From: Neil Madden <nem@xxxxxxxxxxxxx>
- Date: Thu, 28 Feb 2008 15:44:46 +0000
tom.rmadilo wrote:
On Feb 28, 6:51 am, "Gerald W. Lester" <Gerald.Les...@xxxxxxx> wrote:mark wrote:mark <jjoyce1...@xxxxxxxxxxx> dixit:% set str {BSBSBSBSBSBSBSBS\Important_info.ars BSBSBSBSBSBS}My string isRetrieve the info between .ars and the first backslah to the left.
BSBSBSBSBSBSBSBS\Important_info.ars BSBSBSBSBSBS
Any ideas?
% set first [string first \\ $str]
% set end [string first .ars $str]
% set target [string range $str [incr $first] [incr $end -1]]
OMG, is this another one of those regressions? I guess so. [Incr] now
auto initializes to zero if the variable doesn't exist.
See TIP 215
-- Neil
.
- Follow-Ups:
- Re: New question on strings
- From: tom.rmadilo
- Re: New question on strings
- References:
- New question on strings
- From: mark
- Re: New question on strings
- From: mark
- Re: New question on strings
- From: Gerald W. Lester
- Re: New question on strings
- From: tom.rmadilo
- New question on strings
- Prev by Date: Re: Tcl and the wiimote
- Next by Date: need a tiny help with my SWIG'd program
- Previous by thread: Re: New question on strings
- Next by thread: Re: New question on strings
- Index(es):