Scanner generators usually do not support capture groups, and frankly, I have never seen the real need for them in a scanner generator. Most of the things you would normally want capture groups for other RegEx engines to handle better in the parser or in a simple piece of code in action.
Perhaps something like the following.
"<"[a-zA-Z]+">" {
String matchedText = yytext();
String label = matchedText.substring(1, matchedText.length() - 1);
return new Token(Type.OPEN_TAG, label);
}
, , . JFlex, , , - flex, , /, , .