Advertisement
Guest User

Untitled

a guest
May 31st, 2016
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. String lines = fr.readLine();
  2.  
  3. Pattern pattern = Pattern.compile("(\w{7,}\s\b.*)");
  4.  
  5. Matcher mm = pattern.matcher(lines);
  6.  
  7. if (mm.matches()) {
  8.  
  9. String oldGroup = mm.group();
  10.  
  11. String singleW = oldGroup.replaceAll("\s", ", ");
  12.  
  13. fw.write(singleW + ", ");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement