Thanks for this one Anonymous Monk. It is working for me.
I have another scenario now,
my $kw = '.Net'; my $title = ".net, .net; C .NET Cobol .NET C++ .NET .NETER Perl IT x.N +ET .net";
The answer should be 6 in this case. Means it has to consider the coma and semicolon cases too, if a $kw is followed by coma or semicolon, it should count.
In reply to Re^4: Regex help \b & \Q
by Anonymous Monk
in thread Regex help \b & \Q
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |