Regular expressions, groups issue

.Zeek

New Member
have a such issue with regexp in java. I code chat application and client could sent to the server just "message" or "\command value". I want to parse this string and check was a command i the line or not. If it login - value is required, but if it logout value.required should be false. I create such regexp \[code\]"^\\\\(?<comm>login|status|((?=logout)))\\s(?<content>\\w+)"\[/code\]What should i write to logout condition? I want to have logout in comm group. I should write something like if logout than do not read anything else which steps after.
 
Top