good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re^3: Generate unique ids of maximum lengthby ikegami (Patriarch) |
on Apr 13, 2010 at 15:05 UTC ( [id://834509]=note: print w/replies, xml ) | Need Help?? |
To shorten "A2990_duallayerA_1" when "A2990_duallayer_1" is also present would require removing from the middle of the word, and that goes against your examples. You didn't specify your spec, so I had to guess a lot. To handle this case, you could consider a lowercase followed by an uppercase to be a word break. Change
to
You get:
Fixed in original code.
In Section
Seekers of Perl Wisdom
|
|