perl regex to array

2004-10-04 Thread Ramprasad A Padmanabhan
Hi, I have slightly a tricky situation, in my large program. I am trying the best to reproduce it I have a string like this $x='a{1}b{21}c{5}d'; # The numbers in the {} are random and are not of interest I want to access all elements from the string 'a' 'b' 'c' & 'd' How do I do it best ?

Re: perl regex to array

2004-10-04 Thread Jenda Krynicky
From: Ramprasad A Padmanabhan <[EMAIL PROTECTED]> > I have slightly a tricky situation, in my large program. I am trying > the best to reproduce it > > > I have a string like this > $x='a{1}b{21}c{5}d'; > # The numbers in the {} are random and are not of interest > > I want to access all elem

Re: perl regex to array

2004-10-04 Thread Jeff 'japhy' Pinyan
On Oct 4, Ramprasad A Padmanabhan said: > I have a string like this >$x='a{1}b{21}c{5}d'; ># The numbers in the {} are random and are not of interest > >I want to access all elements from the string 'a' 'b' 'c' & 'd' >How do I do it best ? I'd do: my @parts = split /{\d+}/, $string; -- Jeff

Re: perl regex to array

2004-10-05 Thread Gavin Henry
Ramprasad A Padmanabhan said: > Hi, > > I have slightly a tricky situation, in my large program. I am trying the > best to reproduce it > > > I have a string like this > $x='a{1}b{21}c{5}d'; > # The numbers in the {} are random and are not of interest > > I want to access all elements from the st