understanding this regex
- by DarthVader
I m trying to understand what the following does.
^([^=]+)(?:(?:\\=)(.+))?$
Any ideas?
This is being used here. Obviously it s command line parser but i m trying to understand the syntax so i can actually run the program. This is from commandline-jmxclient , they have no documents on setting JMX properties but in their source code, there is such an option, so i just want to understand how i can invoke that method.
Matcher m = Client.CMD_LINE_ARGS_PATTERN.matcher(command);
if ((m == null) || (!m.matches())) {
throw new ParseException("Failed parse of " + command, 0);
}
this.cmd = m.group(1);
if ((m.group(2) != null) && (m.group(2).length() > 0))
this.args = m.group(2).split(",");
else
this.args = null;