Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Write a script for 'count the no.of digits using regular
expressions in perl..

Answer Posted / santha

$testnumber='34535sssss24';
$numbercount=0;
while($testnumber=~m{\d}igs)
{
$numbercount++;
}
print "\n $numbercount";

Is This Answer Correct ?    3 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do find the length of an array?

1077


Explain lists ?

901


Write a program to show the process of spawning a child process

829


How does a “grep” function perform?

988


How to dereference a reference?

945


How are parameters passed to subroutines in perl?

904


What is the difference between use and require in perl programming?

896


You want to concatenate strings with perl. How would you do that?

838


What are scalar data and scalar variables?

1073


How do I replace every character in a file with a comma?

947


In Perl, there are some arguments that are used frequently. What are that arguments and what do they mean?

870


How and what are closures implemented in perl?

856


What is use of ‘->’ symbol?

962


Why aren't Perl's patterns regular expressions?

1108


Where do we require ‘chomp’ and what does it mean?

934