Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- > E/AndroidRuntime(14700): Process: com.example.log_v_02, PID: 14700
- > E/AndroidRuntime( 4700): Process: com.example.log_v_02, PID: 14700
- Pattern saca_pid = Pattern.compile("(\\s*(\\d+)):");
- StringBuilder log=new StringBuilder();
- String line = "";
- while (true) {
- try {
- if (!((line = bufferedReader.readLine()) != null)) break;
- } catch (IOException e) {
- e.printStackTrace();
- }
- Matcher encuentra_pid = saca_pid.matcher(line);
- if(encuentra_pid.find()){
- String pid = encuentra_pid.group(1);
- int num_pid = Integer.parseInt(pid);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement