First, .* is almost always wrong. It is greedy, it does match nothing and anything.
Second, just do it. Get the second group, then break it up. You will have to deal with the elements anyways. It can be seen as a sport to process all with just one regex, but that's often error prone, unreadable, unmaintainable and slower.
In reply to Re: Multiple Capture Groups in RegEx
by shmem
in thread Multiple Capture Groups in RegEx
by ketema
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |