Re: Extract a number from a complicated string

2007-12-21 Thread Sion Arrowsmith
Gerardo Herzig <[EMAIL PROTECTED]> wrote: >>My problem is that I need to extract from this string the number. For >>instance in xyz.vs.1-81_1 I have to extract the number 81, and in >>xyz.vs.1-1234_1 I need to get the number 1234. >> >>What is the easiest way of doing this ? >If the strings looks

Re: Extract a number from a complicated string

2007-12-21 Thread Neil Cerutti
On 2007-12-21, Horacius ReX <[EMAIL PROTECTED]> wrote: > Hi, > > I have to read some data from a file, and on each block it always > appears the followng string; xyz.vs.1-81_1 . It appears a lot of time > with different numbers like; > > xyz.vs.1-81_1 > xyz.vs.1-1234_1 > xyz.vs.1-56431_1 > > and so

Re: Extract a number from a complicated string

2007-12-21 Thread Bruno Desthuilliers
Horacius ReX a écrit : > Hi, > > I have to read some data from a file, and on each block it always > appears the followng string; xyz.vs.1-81_1 . It appears a lot of time > with different numbers like; > > xyz.vs.1-81_1 > xyz.vs.1-1234_1 > xyz.vs.1-56431_1 > > and so on > > My problem is that I

Re: Extract a number from a complicated string

2007-12-21 Thread Gerardo Herzig
Horacius ReX wrote: >Hi, > >I have to read some data from a file, and on each block it always >appears the followng string; xyz.vs.1-81_1 . It appears a lot of time >with different numbers like; > >xyz.vs.1-81_1 >xyz.vs.1-1234_1 >xyz.vs.1-56431_1 > >and so on > >My problem is that I need to extrac

Extract a number from a complicated string

2007-12-21 Thread Horacius ReX
Hi, I have to read some data from a file, and on each block it always appears the followng string; xyz.vs.1-81_1 . It appears a lot of time with different numbers like; xyz.vs.1-81_1 xyz.vs.1-1234_1 xyz.vs.1-56431_1 and so on My problem is that I need to extract from this string the number. For