hi all, i have a doubt on this regular exp can anyone explain me clearly.. actualy i am
trying to extract the multiple conditions inside while and if... am using perl 5.8.6
windows XP.......
my perl code sampled:
my $count = 0;
foreach my $condition (@conditions) {
$count++;
my ($open,$close) = $condition =~ /( (?: [(] | \s )* ) (.*) /msx;
print "$open $count $close";
}
and my C code
while
(
(
1 condition A &&
2 condition B
)&&
(
3 condition C
4 condition D
)
)
and am facing the problem when i have a while loop like this
while
(
(condition A) &&
(condition B)
)
my desired output has to be....
while
(
1 (condition A) &&
2 (condition B)
)
but it prints has...
while
(
( 1 condition A) &&
( 2 condition B)
)
can anyone help me with the regex pls to get my desired output?