I'm developing a piece of code to filter a text as follows:
<DATA>
.SUBCKT SVI A B C D E F
+ G H I
+ J K L
.....
+ X Y Z
*.PININFO AA BB CC
*.PININFO DD EE FF
<DATA>
I need the output to be
A B C D E F
G H I
J K L
.....
X Y Z
I already made a regular expression to do so:
m/\.SUBCKT\s+SVI\s(.*)|\+(.*)/gm
The problem is that I have many similar sections like this input but I only need to detect + lines which are following .SUBCKT SVI header not any other header.
How I could match group many times like (\+\s+(.*)). I want to match this repeated capture group as it repeated many times.
Any advice to get this expression.
"any other header"andplus lines.. Continuity, etc ...