Posted By

guai on 10/12/11


Tagged

jedit


Versions (?)

jEdit join without spaces


 / Published in: Java
 

  1. int start = textArea.getSelection(0).getStart();
  2. text = java.util.regex.Pattern.compile("(?sm)$.*?^[ \t]*").matcher(textArea.getSelectedText()).replaceAll("");
  3. textArea.replaceSelection(text);
  4. textArea.setSelection(new Selection.Range(start, start + text.length()));

Report this snippet  

You need to login to post a comment.