// Path: AnyEditTools/src/de/loskutov/anyedit/util/LineReplaceResult.java
// public class LineReplaceResult {
//     /** relative to line start, changed results must have index >= 0 */
//     public int startReplaceIndex;
//     /** changed results must have have range > 0, to replace entire line specify "-1" for the range */
//     public int rangeToReplace;
//     /** changed results must have not-null text to replace */
//     public String textToReplace;
// 
//     @Override
//     public String toString() {
//         StringBuffer sb = new StringBuffer();
//         sb.append("startIndex: ").append(startReplaceIndex);  //$NON-NLS-1$
//         sb.append(", range: ").append(rangeToReplace);  //$NON-NLS-1$
//         sb.append(", text: ").append(textToReplace);  //$NON-NLS-1$
//         return sb.toString();
//     }
// }


import java.math.BigInteger;
import java.util.Comparator;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import de.loskutov.anyedit.util.LineReplaceResult;
        }
        return 0;
    }

    protected int compareLineCaseInsensitive(LineReplaceResult left, LineReplaceResult right) {
        int result = line(left).compareToIgnoreCase(line(right));
        if (result == 0) {
            result = line(left).compareTo(line(right));
        }
        return result;
    }

    protected String line(LineReplaceResult object) {
        String line = object.textToReplace;
        if (line != null) {
            return line;
        }
        return "";
    }

    protected int compareNumber(LineReplaceResult left, LineReplaceResult right) {
        BigInteger l = number(left);
        BigInteger r = number(right);
        if (l == null || r == null) {
            return 0;
        }
        return l.compareTo(r);
    }

    private BigInteger number(LineReplaceResult object) {
// Path: AnyEditTools/src/de/loskutov/anyedit/util/LineReplaceResult.java
// public class LineReplaceResult {
//     /** relative to line start, changed results must have index >= 0 */
//     public int startReplaceIndex;
//     /** changed results must have have range > 0, to replace entire line specify "-1" for the range */
//     public int rangeToReplace;
//     /** changed results must have not-null text to replace */
//     public String textToReplace;
// 
//     @Override
//     public String toString() {
//         StringBuffer sb = new StringBuffer();
//         sb.append("startIndex: ").append(startReplaceIndex);  //$NON-NLS-1$
//         sb.append(", range: ").append(rangeToReplace);  //$NON-NLS-1$
//         sb.append(", text: ").append(textToReplace);  //$NON-NLS-1$
//         return sb.toString();
//     }
// }


// Path: AnyEditTools/src/de/loskutov/anyedit/actions/sort/AbstractSortComparator.java
import java.math.BigInteger;
import java.util.Comparator;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import de.loskutov.anyedit.util.LineReplaceResult;

        }
        return 0;
    }

    protected int compareLineCaseInsensitive(LineReplaceResult left, LineReplaceResult right) {
        int result = line(left).compareToIgnoreCase(line(right));
        if (result == 0) {
            result = line(left).compareTo(line(right));
        }
        return result;
    }

    protected String line(LineReplaceResult object) {
        String line = object.textToReplace;
        if (line != null) {
            return line;
        }
        return "";
    }

    protected int compareNumber(LineReplaceResult left, LineReplaceResult right) {
        BigInteger l = number(left);
        BigInteger r = number(right);
        if (l == null || r == null) {
            return 0;
        }
        return l.compareTo(r);
    }

    private BigInteger number(LineReplaceResult object) {
        Matcher matcher = pattern.matcher(line(object));