I have below text and I want to obtain certain parts from it.
Checkbox[Skip Transfer]: Skip the transfer process if checked.
Dropdown[OS Types]: A dropdown to select the target OS. Transfer protocol,
connection protocol and destination path will be adjusted
based on this option.
* Destination path may be changed manually. If it was
changed this option has no effect on destination.
Dropdown[CPU Types]: A dropdown to select the executable. Target file will be
adjusted based on this option.
* Source file may be changed manually. If it was
changed this option has no effect.
Dropdown[Copy Actions]: A dropdown to select the action that will be applied on the
destination file.
This is my help message and I want to pass related parts to the related items.
Checkbox[Skip Transfer]: Skip the transfer process if checked.
For this line, Checkbox is my type, Skip Transfer is my text and Skip the transfer process if checked. is my help message for related item.
I tried following regex(in Python):
(?P<kind>\w+)\[(?P<name>[\w ]+)\].*:\s+(?P<help_msg>[\w\W]*)(?!(\w+\[))
The kind and the name parsed successfully but I couldn't get the help message correctly.