for $number (1006326869812, 563296853235993 , 35968322963568389){
        print "$1-$2-$3\n" if ($number =~ /(\d*)(\d{4})(\d{5})/);

}

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of
> [EMAIL PROTECTED]
> Sent: Thursday, November 29, 2001 3:32 PM
> To: [EMAIL PROTECTED]
> Subject: Regular expression help
> 
> 
> I need help creating a regular expression to do the following.
> 
> I have the following numbers:
> 
> 1006326869812
> 563296853235993
> 35968322963568389
> 
> and it needs to be broken up like this
> 
> 1006-3268-69812
> 563296-8532-35993
> 35968322-9635-68389
> 
> Notice the second group of numbers is always 4 places and the 
> last group is
> always 5 places.
> 
> I'm stumped and not to good with RE's. Any pointers would be great.
> 
> Rob
> _______________________________________________
> Perl-Win32-Users mailing list
> [EMAIL PROTECTED]
> http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
> 
> 

_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users

Reply via email to