loki has asked for the wisdom of the Perl Monks concerning the following question:
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
my desired output has to be....while ( (condition A) && (condition B) )
but it prints has...while ( 1 (condition A) && 2 (condition B) )
while ( ( 1 condition A) && ( 2 condition B) )
can anyone help me with the regex pls to get my desired output?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: doubt on assertion regex
by Anonymous Monk on Jan 20, 2010 at 16:04 UTC | |
by loki (Novice) on Jan 21, 2010 at 06:29 UTC | |
by Anonymous Monk on Jan 21, 2010 at 08:12 UTC |