my $count;
my $description = "This is my description and it contains numerous __ double underscore marks and __ these mark some special area in the
field";
$count++ while $description =~ /(__)/gi;
############
The above code will give 1 if __ is found in the description 2 if __ and __ found in the field and so on.
My problem is I want to get the same result even upto six under scores in a row. i.e.
______ (six underscores in a row or less) should equal one. (1-6 underscores should equal one).
Any ideas?
my $description = "This is my description and it contains numerous __ double underscore marks and __ these mark some special area in the
field";
$count++ while $description =~ /(__)/gi;
############
The above code will give 1 if __ is found in the description 2 if __ and __ found in the field and so on.
My problem is I want to get the same result even upto six under scores in a row. i.e.
______ (six underscores in a row or less) should equal one. (1-6 underscores should equal one).
Any ideas?