Created
October 8, 2018 00:31
-
-
Save vaibhav93/73215a8384264696c81ea7c7aa3fb913 to your computer and use it in GitHub Desktop.
Get action
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while ((line = br.readLine()) != null) { | |
// process the line. | |
Pattern pattern = Pattern.compile(".*_([a-zA-Z]+)_.*"); | |
Matcher matcher = pattern.matcher(line); | |
if (matcher.find()) | |
{ | |
// Action = If, Tiger, After, ..... | |
String action = matcher.group(1); | |
System.out.println(action); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment