fork(1) download
  1. import java.util.*;
  2. import java.lang.*;
  3. import java.io.*;
  4. class Ideone
  5. {
  6. public static void main (String[] args) throws java.lang.Exception
  7. {
  8. String s = "don't try to ''''remove apostr inside'''' word' 'żoł'";
  9. s = s.replaceAll("(?U)\\B'\\b|\\b'\\B|\\B'\\B", "");
  10. System.out.println(s);
  11. }
  12. }
Success #stdin #stdout 0.05s 711168KB
stdin
Standard input is empty
stdout
don't try to remove apostr inside word żoł