Can you help me with regex?
I have line
"Sites www.google.com и www.ridd.rdd..com good."
After parse I'v get this type of line:
"Sites http://www.google.com и www.ridd.rdd..com good."
Problem with checking consecutive points. To sites with an error (with two points in a row) "http//:"
should not be appended.
My regex:
Matcher matchr = Pattern.compile("w{3}(\\.\\w+)+[a-z]{2,6}").matcher(text);
while (matchr.find()) {
text = text.replace(matchr.group(0), "http://" + matchr.group(0));
}
System.out.println(text);