Okay so i want to separate certain assignments into groups out of a string with the help of a regular expression in java.
My String looks like this:
LogEventDefinition(
logEvent = LogEvent.MESSAGE700,
process = process.Data,
processStep = "action")
my final solution should group it like this:
group 1 group 2
logEvent LogEvent.MESSAGE700
process process.Data
processStep action
My idea is this:
(?=@LogEventDefinition\()(\w+)\s=(\s\w+)|(?:\s\w+\.(\w+))\\)
I do a lookahead and then check the following content of the String LogEventDefinition from the first bracket on. Essentially it is totally wrong, tried a few other attempts but nothing works, would appreciate your help a lot.