in reply to grabbing chunks of text
@blocks = /:\w.*? type = .*?(?=:\w)/sg;
You need zero-width lookahead for the final :\w substring. Otherwise it will already have been consumed and no longer available when the next match attempt starts. Also, you need option /g for "global" matching.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: grabbing chunks of text
by spencerd (Novice) on Mar 10, 2010 at 18:38 UTC | |
by ikegami (Patriarch) on Mar 10, 2010 at 18:59 UTC | |
by spencerd (Novice) on Mar 10, 2010 at 19:12 UTC | |
by ikegami (Patriarch) on Mar 10, 2010 at 19:32 UTC |