On Feb 20, Tim Musson said: >The people who control the data want to remove the _ chars and make >the delimiter based on the case of the chars (first char of each part >is uc, all others are lc)... >So the source would look like this > UaBitEssdSi >I still need to put the same elements into @dpt, so >$dpt[0]=Ua >$dpt[1]=Bit >$dpt[2]=Essd >$dpt[3]=Si >After I get the data into the array, I will change the case.
You can use split() like so: @dpt = split /(?<=[a-z])(?=[A-Z])/, "UaBitEssdSi"; although that is admittedly UGLY. Therefore, abandon split() and use a regex proper: @dpt = "UaBitEssdSi" =~ /[A-Z][a-z]*/g; -- Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/ RPI Acacia brother #734 http://www.perlmonks.org/ http://www.cpan.org/ ** Look for "Regular Expressions in Perl" published by Manning, in 2002 ** <stu> what does y/// stand for? <tenderpuss> why, yansliterate of course. [ I'm looking for programming work. If you like my work, let me know. ] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]