shemp has asked for the wisdom of the Perl Monks concerning the following question:
And yields the result of:my $string = "A BC 1 23DEF45 6"; my @parts = split /(?:\s+|(?<=\d)(?=[A-Z])|(?<=[A-Z])(?=\d))/i, $s +tring; foreach my $part (@parts) { print "part = $part\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
•Re: Regex - unordered lookaround syntax
by merlyn (Sage) on Apr 28, 2003 at 22:57 UTC | |
by halley (Prior) on Apr 29, 2003 at 00:28 UTC | |
by Anonymous Monk on Apr 29, 2003 at 04:56 UTC | |
by halley (Prior) on Apr 29, 2003 at 15:31 UTC | |
by shemp (Deacon) on Apr 28, 2003 at 23:04 UTC | |
|
Re: Regex - unordered lookaround syntax
by runrig (Abbot) on Apr 28, 2003 at 23:27 UTC | |
|
Re: Regex - unordered lookaround syntax
by The Mad Hatter (Priest) on Apr 28, 2003 at 22:55 UTC | |
by diotalevi (Canon) on Apr 28, 2003 at 23:20 UTC | |
by Your Mother (Archbishop) on Apr 29, 2003 at 00:29 UTC | |
|
Re: Regex - unordered lookaround syntax
by aquarium (Curate) on Apr 29, 2003 at 01:48 UTC |