phanindhar1

Untitled

Dec 5th, 2021
537
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     public static void main(String[] args) {
  2.  
  3.         String test = "PJ2639: PJ2639 - AIEEE191";
  4.         String[] out = test.split("-");
  5.  
  6.         String target = out[1].trim();
  7.  
  8.         System.out.println("target : " +target);
  9.  
  10.         String[] out2 = target.split("(?<=\\D)(?=\\d)");
  11.  
  12.         String target_prefix = out2[0];
  13.         String target_id = out2[1];
  14.  
  15.         System.out.println("target_prefix : " +target_prefix);
  16.         System.out.println("target_id : " +target_id);
  17.         Integer id = Integer.parseInt(target_id);
  18.  
  19.         System.out.println("target_id_num : " +id);
  20.     }
RAW Paste Data