dyno has asked for the wisdom of the Perl Monks concerning the following question:
I got the result:$_ = "X1aaX2bbX3heeX4...X5loveU" ; @match = /X\d.+?/g; print "String: " . $_; foreach $word (@match){ print "\n$word"; }
I want the result to be below:X1aaX2bbX3heeX4...X5loveU X1a X2b X3h X4. X5l
How can I fix it?X1aaX2bbX3heeX4...X5loveU X1aa X2bb X3hee X4... X5loveU
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: use regex to split sentence
by jmcnamara (Monsignor) on Nov 01, 2002 at 09:37 UTC | |
by jryan (Vicar) on Nov 01, 2002 at 18:17 UTC | |
by kelan (Deacon) on Nov 02, 2002 at 05:08 UTC | |
|
Re: use regex to split sentence
by jryan (Vicar) on Nov 01, 2002 at 07:03 UTC | |
by dyno (Initiate) on Nov 01, 2002 at 07:15 UTC | |
by djantzen (Priest) on Nov 01, 2002 at 07:56 UTC | |
by dyno (Initiate) on Nov 01, 2002 at 08:58 UTC | |
by dyno (Initiate) on Nov 01, 2002 at 09:01 UTC |