fork download
  1. import java.util.regex.Matcher;
  2. import java.util.regex.Pattern;
  3.  
  4. class Main {
  5. public static void main(String[] args) {
  6. Pattern p = Pattern.compile("DISP \\(\\w+\\) A830");
  7. Matcher m;
  8. for(String l: new String[]{
  9. "011-10-01 17:23:28,262 (Reciever.java:49) - 16:58:34 INFO CT21056 Text: Medical ProQA processing complete616:58:59 SELECT FES01115616:59:29",
  10. "DISP (FES01115) A8306 Text: A SICK616:59:29 PRIM (FES01115) A8306",
  11. "2011-10-01 17:23:28,262 (Reciever.java:51) - 5 old Female Conscious Breathing5 16:58:35 NOMORE CT210566",
  12. "2011-10-01 17:23:28,272 (Reciever.java:92) - DATA: 16:58:34 INFO CT21056 Text: Medical ProQA processing"
  13. }) {
  14. m = p.matcher(l);
  15. if(m.find())System.out.println(l);
  16. }
  17. }
  18. }
Success #stdin #stdout 0.03s 245632KB
stdin
Standard input is empty
stdout
DISP (FES01115) A8306 Text: A SICK616:59:29 PRIM (FES01115) A8306