Looking to extract a specific pattern from text.
Here's a sample text:
Test: []
subtests: [a]
The goal is to retrieve the line subtests: [a]
or more specifically, the data inside the []
of subtests.
Although attempting to match with regex, the output is incorrect. Unsure what mistake I might be making.
https://jsfiddle.net/abcd1234/5/
Any assistance would be greatly appreciated!