Hi Bill (in Brooklyn),
Ng, Bill <[EMAIL PROTECTED]> wrote:
> Real simple,
>
> I have a string, "$a" for arguments sake, that contains a single
> word. The word will always have exactly 8 characters in it, most
> likely something like "ABCD1234". I need to split this up into two
> strings ($b & $c), the first string needs to contain all the
> characters before the first number in the word ("ABCD" in this
> example), the second string needs everything after, and including,
> the first number in the word "1234" in this example.
> [...] How would YOU go about doing this? Inquiring minds want to
> know.
my ($b, $c) = ($1, $2) if $a =~ /^(\D+)(\d+)/;
-dave
_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs