easy way with org.apache.commons.lang.StringUtils
action="bypass admin_test [a] $var [/a] [b] $var2 [/b] [c] $var3 [/c]"
String text = StringUtils.substringBetween(command, "[a] ", " [/a]");
String text2 = StringUtils.substringBetween(command, "[b] ", " [/b]");
String text3 = StringUtils.substringBetween(command, "[c] ", " [/c]");