Lecture -23 PERL-Part III
Loading...
24,689
Top Comments
see all
All Comments (25)
-
no sound come please do something
-
@skmarwat OR /^(\w\s)+$/ i think this will also work, i havnt test it right now but it will.
-
@arunanirudhan yes it will print only the first word, you can change the regex as /^(\w+\s+\w+)$/ , it will print the full line.
-
I cont hear voice from this video... Can you correct it ?
-
I cont hear voice from this video... Can you correct it ?
-
I cont hear voice from this video... Can you correct it ?
-
@arunanirudhan : you need to correct your concepts ... regex(s) are greedy and not perl ... does that make sence !!!
Loading...
my $str="Ram and shyam are honest";
$str=~/^(\w+)/;
print "$1\n";
Sir, this will print out Ram
arunanirudhan 1 year ago 4
print "$1 $2\n";this will print out Ram and
arunanirudhan 1 year ago 2