fork(19) download
  1. import java.util.*;
  2. import java.lang.*;
  3. import java.util.regex.*;
  4.  
  5. class Main
  6. {
  7. public static void main (String[] args) throws java.lang.Exception
  8. {
  9. System.out.println(
  10. "12345 <RECTANGLE> 100 200 300 400 </RECTANGLE>".replaceAll("[</>]", "").replaceAll(" [^ ]+$", "")
  11. );
  12. }
  13. }
Success #stdin #stdout 0.03s 245632KB
stdin
Standard input is empty
stdout
12345 RECTANGLE 100 200 300 400