Advertisement
Guest User

Untitled

a guest
Jun 15th, 2019
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. > E/AndroidRuntime(14700): Process: com.example.log_v_02, PID: 14700
  2. > E/AndroidRuntime( 4700): Process: com.example.log_v_02, PID: 14700
  3.  
  4. Pattern saca_pid = Pattern.compile("(\\s*(\\d+)):");
  5. StringBuilder log=new StringBuilder();
  6. String line = "";
  7. while (true) {
  8. try {
  9. if (!((line = bufferedReader.readLine()) != null)) break;
  10. } catch (IOException e) {
  11. e.printStackTrace();
  12. }
  13.  
  14. Matcher encuentra_pid = saca_pid.matcher(line);
  15. if(encuentra_pid.find()){
  16. String pid = encuentra_pid.group(1);
  17. int num_pid = Integer.parseInt(pid);
  18. }
  19.  
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement