I want to have such a method leastMatch(String input, String regExp, int n)
input is the input text, regExp is the regular expression and n is the minimal amount of characters the result has.
The return value is a head of the input text which matches the regular expression and contain
at least n characters.
e.g.
leastMatch("abababab", "(ab)+", 3) //returns "abab"
leastMatch("abababab", "(ab)+", 0) //returns ""
leastMatch("abababab", "(ab)+", 4) //returns "abab"