Multiple lines in perl regex
hi, i am trying to make a parser for separating required text from a m-script.
In that m-script i have different kind of declarations e.g.
1: par_1.1_anything = min_value;
2: any_parameter = [ 0 2 3 5;
6 9 min_v_1 10;
12 15 30 35];
3: diff.name = [ 5
4: not_req = [ 11 13 15;
19 24 30;
31 33 39];
So i want to separate all those declaration single line and as well as multi-line which have any character between "=" and the end i.e. "];"
What i am doing is using while(<>) so that it read any input file and then i am using print if $_ =~ /regular expression/ ;
and then save the output in output file.
i am quite successful with single lines but i and stuck with multiple lines.
I want something which when see "[" then i search all lines for any character [a-zA-Z] until it find "];" and then if it find any character in between it print the whole declaration.
Please help me in this matter.
Thanks a lot.