I'm trying to make a group at the end optional. But it includes one excess result. What the right regex could look like? Would appreciate any help here.
Regex = <!([a-z]{0,25})\|([^\|>]*)\|([^\|<>]*)(\|([^\|<>]*))?>
Example = <!user|123|Kirill|{"color":"rgb(255, 184, 75)"}> published <!content|456|A cool content>
Gives the following 1st matched group, the highlighted is the excess unexpected result: