Perl : How to get All grouped patterns
Posted
by pavun_cool
on Stack Overflow
See other posts from Stack Overflow
or by pavun_cool
Published on 2010-04-01T09:32:42Z
Indexed on
2010/04/01
9:43 UTC
Read the original article
Hit count: 219
perl
I have this following code.
Here I am matching the vowels characters words
if ( /(a)+/ and /(e)+/ and /(i)+/ and /(o)+/ and /(u)+/ )
{
print "$1#$2#$3#$4#$5\n";
$number++;
}
I am trying to get the all matched patterns using grouping .
But I am getting only last expression pattern , which means fifth expression
of if
condition . Here I know that it is giving only one pattern because
last pattern matching in if
condition. But I want to get all matched patterns
Any one help me out of this problem.
© Stack Overflow or respective owner