Skip to content

Instantly share code, notes, and snippets.

@vaibhav93
Created October 8, 2018 00:31
Show Gist options
  • Save vaibhav93/73215a8384264696c81ea7c7aa3fb913 to your computer and use it in GitHub Desktop.
Save vaibhav93/73215a8384264696c81ea7c7aa3fb913 to your computer and use it in GitHub Desktop.
Get action
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