I have a simple Java application that's a GUI for a command line application, and I have a field where the user can add additional command line arguments. The thing is, I want to pass all arguments to an "option file" the CLI application uses, but to do that I need to split each argument accordingly.
An example:
--edit info --set title=My Title 1 --edit track:v1 --set flag-default=0 --set flag-forced=0
Must become
--edit
info
--set
title=My Title 1
--edit
track:v1
--set
flag-default=1
--set
flag-forced=0
I basically need a RegEx that will match this: --set[MATCH]title=My Title 1[MATCH]--edit[MATCH]track:v1
I don't know if this is simple or not, I tried several RegEx arguments but it was way over my head.
The CLI application is mkvpropedit, by the way.