Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I'm trying to parse a string and capture chunks of data for every 4 dots like so:
I've tried splitting the string on the dot, pushing it onto an array, counting the dots until I reach 4, reassembling the chunk and then pushing it onto another array. This seems like it should be much easier, any suggestions?data = 12d.9j7h.7tttt.125.ty.2.4.8.9f.y6.34gk.ll after parse = 12d.9j7h.7tttt.125 ty.2.4.8 9f.y6.34gk.ll
Thanks
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: regex needed for dot delimited string
by Abigail-II (Bishop) on Sep 10, 2003 at 10:58 UTC | |
|
Re: regex needed for dot delimited string
by broquaint (Abbot) on Sep 10, 2003 at 11:04 UTC | |
by zby (Vicar) on Sep 10, 2003 at 11:20 UTC | |
|
Re: regex needed for dot delimited string
by Anonymous Monk on Sep 10, 2003 at 11:35 UTC |