re: Extracting number from string

2004-05-04 Thread Jose Alves de Castro
If I was taking all the digits out (result would be 123400), I would do: y/0-9//cd; This takes all the characters not in [0-9] and deletes them. On Mon, 2004-05-03 at 19:58, William Black wrote: > Hello All, > > I need a regular expression to extract only the number from the below > string.

RE: Extracting number from string

2004-05-03 Thread Wagner, David --- Senior Programmer Analyst --- WGO
William Black wrote: > Hello All, > > I need a regular expression to extract only the number from the below > string. How is this done? > > x=G1234v00 the number in $1 if ( /^.(\d+)/ ) { # you have a number # now if always a G then cyou could change to ^G(\d+)

Re: Extracting number from string

2004-05-03 Thread WilliamGunther
In a message dated 5/3/2004 2:58:40 PM Eastern Daylight Time, [EMAIL PROTECTED] writes: >Hello All, > >I need a regular expression to extract only the number from the below >string. How is this done? > >x=G1234v00 > >Result=1234 > >William Black print 'G1234v00' =~ /(\d+)/; -will http://www.w

re: Extracting number from string

2004-05-03 Thread William Black
Hello All, I need a regular expression to extract only the number from the below string. How is this done? x=G1234v00 Result=1234 William Black _ Stop worrying about overloading your inbox - get MSN Hotmail Extra Storage! http: