Re: Extract digits from string

2006-09-08 Thread Juan Pablo Feria Gomez
> my @array = $data =~ /\((\d+)\)/g; And what does this means ^^ ? is not an ^, is / next to a \(/\) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Extract digits from string

2006-09-08 Thread Andy Greenwood
start with the regex. It's going to look in $data for items that match and return the elements caught by the ()'s into @array. the regex will catch anything that: 1) starts with a ( 2) is made up of at least 1 digit character 3) ends with a ) On 9/8/06, J. Alejandro Noli <[EMAIL PROTECTED]> wro

Re: Extract digits from string

2006-09-08 Thread J. Alejandro Noli
Jeff Pang <[EMAIL PROTECTED]> writes: > Hi,how about this? > > my @array = $data =~ /\((\d+)\)/g; And what does this means ^^ ? Thanks ! > > -Original Message- >>From: john wright <[EMAIL PROTECTED]> >>Sent: Sep 5, 2006 11:29 AM >>To: beginners@perl.org -- To unsubscribe, e-m

Re: Extract digits from string

2006-09-05 Thread Dr.Ruud
john wright schreef: > I have a data in a variable like > $data="book(18614)---book2.2(18616)---book3(18617)---book4(14432) > . so on" i want to store all digit value lying between ( > ) into an array. $array[0]=18614 > $array[1]=18616 > $array[2]=18617 ... so on @array = $d

Re: Extract digits from string

2006-09-05 Thread Jeff Pang
Hi,how about this? my @array = $data =~ /\((\d+)\)/g; -Original Message- >From: john wright <[EMAIL PROTECTED]> >Sent: Sep 5, 2006 11:29 AM >To: beginners@perl.org >Subject: Extract digits from string > >Hi, > I have a data in a variable like > $data="book(18614)---book2.2(18616)---book