Or, improving on both of ours, just:
@match = split (/(?=X\d)/,$_);
For some retarded reason last night, I thought that split "kept" the part that it split on, forgetting that the trick to do that was to use a lookahead. :)
In reply to Re: Re: use regex to split sentence
by jryan
in thread use regex to split sentence
by dyno
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |