This is one way I've come up with.
Basically the idea is to use a Comparator. In the Comparator, the character portion of the Strings are seperated from the numeric portion. Then as Strings, the numeric portions are left padded with 0s to be of equal length. The Strings are then put back together and compared.
So, for example, when comparing L2 and L100, the Strings would become L002 and L100.
This code works under the premise that each
String in the ArrayList will be composed of one or more characters followed by one or more digits.
[ March 23, 2006: Message edited by: Keith Lynn ]
[ March 23, 2006: Message edited by: Keith Lynn ]