justino berrun wrote: > #hello, is there a way to split a string between a digit and character > $string='hello...4546perl.......2366Pogrammers..3435'; #e.g. would make three new >strings
Try: (my $ElementString = $string) =~ s /(\d+)(\D+)/$1-$2/g; print "$ElementString\n"; $ElementString is there just in case you want to preserve the original string, since the substitution operator is destructive. Joseph -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]