Java multiline regex

Job ID: 30799393

Budget: $10 – $30 USD

I need to match a repeated text block using a regex in Java.

My input text is Flexlm license file and I need to extract all feature blocks. According to Openlm blog the Flexlm license file format should look as described:

{FEATURE|INCREMENT} feature vendor feat_version exp_date num_lic SIGN=sign [optional_attributes]

As you can understand from the format there can be [optional_attributes] which vary between each license file.
A feature block will be everything that start with INCREMENT or FEATURE ^(FEATURE|INCREMENET) and will follow with lines that start with multiple spaces (\s+)

A small example for license file - feature blocks

INCREMENT example1 ex1 2020.09 28-oct-2022 75 \
...
...
...
INCREMENT example2 ex2 2020.09 28-oct-2022 75 \
...
...
...

The wanted output will be multiple matches in a single group. With each match include a feature block