>>>>> "Swaroop" == Swaroop Kumar <swaroop_t_mca@...> writes:
Swaroop> Dear Member,
Swaroop> I have a regular expression. How can i find the no.of matchings
Swaroop> of the regular expression. First, Second ...matchings i know as $1,$2...
my @all_matches = $string =~ /pattern_here/g;
my $number_of_matches = @all_matches; # array name in scalar context == length
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!