I have an algorithm that works with insertion, deletion and substitution counts of a word compared to a format. I can find these counts in Python like below, fuzzy_counts give me these error counts:
import regex
regex_pattern = r"([0-9]{6}){e}"
word = '12345'
regex_object = regex.fullmatch(regex_pattern, word, regex.ENHANCEMATCH)
print(regex_object)
Output:
<regex.Match object; span=(0, 5), match='12345', fuzzy_counts=(0, 0, 1)>
However I need this same thing in Java.
Thanks for the help.