Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- String lines = fr.readLine();
- Pattern pattern = Pattern.compile("(\w{7,}\s\b.*)");
- Matcher mm = pattern.matcher(lines);
- if (mm.matches()) {
- String oldGroup = mm.group();
- String singleW = oldGroup.replaceAll("\s", ", ");
- fw.write(singleW + ", ");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement