justino berrun wrote:
> #hello, is there a way to split a string between a digit and character
> #without losing the digit or the character
> #Any help would be very appreciated
> 
> $string='hello...4546perl.......2366Pogrammers..3435'; #e.g. would
> make three new strings 
> 
> @newstrings=split(/(\d)([a-zA-Z])/,$string);         #<--- no success
> here print join(":",@newstrings);
> 
> #working toward an output like so:
> #hello...4546:perl.......2366:Pogrammers..3435
> --
> ______________________________________________
> http://www.linuxmail.org/
> Now with POP3/IMAP access for only US$19.95/yr
> 
> Powered by Outblaze
        When you use split, the split portion is removed from the output, so
I don't believe that is what you are after.

        Here is a quick snippet:

my $string='hello...4546perl.......2366Pogrammers..3435'; #e.g. would make
three new strings 
while ( $string =~ /(\w+\.+\d+)/g ) { # looking for a combination of alpha,
periods and numerics
    push(@newstrings, $1);
 }

print join(":",@newstrings);

#output:

hello...4546:perl.......2366:Pogrammers..3435

Wags ;)



**********************************************************
This message contains information that is confidential
and proprietary to FedEx Freight or its affiliates.
It is intended only for the recipient named and for
the express purpose(s) described therein.
Any other use is prohibited.
****************************************************************


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to