Re: New question on strings



tom.rmadilo wrote:
On Feb 28, 6:51 am, "Gerald W. Lester" <Gerald.Les...@xxxxxxx> wrote:
mark wrote:
mark <jjoyce1...@xxxxxxxxxxx> dixit:
My string is
BSBSBSBSBSBSBSBS\Important_info.ars BSBSBSBSBSBS
Retrieve the info between .ars and the first backslah to the left.
Any ideas?
% set str {BSBSBSBSBSBSBSBS\Important_info.ars BSBSBSBSBSBS}
% 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
.