public static String parsePreVersion(String text) {
        if (parseVersion(text) == null) {
            return text;
        }

        final Matcher matcher = RX_PRE_VERSION.matcher(text);
        if (matcher.find()) {
            return matcher.group(1);
        }
        return text;
    }
@Test
    public void testParsePreVersion() {
        String text = "library-name-1.4.1r2-release.jar";
        String expResult = "library-name";
        String result = DependencyVersionUtil.parsePreVersion(text);
        assertEquals(expResult, result);

    }