Input:
template header
company
subCompany
package dummyRule;
template "dummy-rule"
rule "dummy-rule"
when
eval(true)
then
System.out.println("Hello World");
end
end template
There can be any number of words & empty lines between template header
& package
. Only words between template header
& package
are needed as output.
Expected Output:
Group 1: company
Group 2: subCompany
Group 3: (next word)
& so on...
What I Tried:
template header(\s+(\w+))+
https://regex101.com/r/O2d41R/3
Actual Result:
Group 1: dummyRule
Group 2: dummyRule