i am looking something similar to
commons-text -LevenshteinDetailedDistance
but for regular expressions.
e.g
LevenshteinDetailedDistance d = new LevenshteinDetailedDistance();
LevenshteinResults levenshteinResults = d.apply("SomeText", "Some Text");
the result will be like below
Distance: 1, Insert: 1, Delete: 0, Substitute: 0
//means - string are different by 1 character
Is there any similar library for approximate matching of regular expressions in java ?
e.g .
String regularEX = ".*Some Text 1.*"
Pattern pattern = Pattern.compile(regularEX, Pattern.CASE_INSENSITIVE | Pattern.DOTALL | Pattern.MULTILINE);
pattern.matcher("anyPrefixText Some Text").matches(); // this will retrun false - but as only one chatterer is missing - i want to get that difference
Is there any inbuilt library that i can use for this ?
i have already seen below questions but they are not helping Approximate regular expression library for Java? Partial Matching of Regular Expressions Partial matching of Regular expression