"zhihua li" schreef:
> I'm curious if there's any smart code to calculate the "distance"
> between the matches in a text.
> Suppose I have a text like this:
> syhk...yes...uhg;ka=...yes...yiealg.yes...ghe;a...yes...
> Apparently it has multiple words of "yes".
> I'd like to know how many
zhihua li wrote:
> hi netters,
>
> I'm curious if there's any smart code to calculate the "distance"
> between the matches in a text.
> Suppose I have a text like this:
> syhk...yes...uhg;ka=...yes...yiealg.yes...ghe;a...yes...
> Apparently it has multiple words of "yes". I'd like to kn
> I'd like to know how many characters there are between the first and the
>last "yes". The way I now come up with to do this is to use substitution to
>"mark" the first and the last match, then use a counting loop to calculate
>the characters..rather straightforward and stupid method.
I t
- Original Message -
From: ""zhihua li"" <[EMAIL PROTECTED]>
Newsgroups: perl.beginners
To:
Sent: Monday, October 23, 2006 9:05 PM
Subject: count the characters between the matches
hi netters,
I'm curious if there's any smart code to calculate
zhihua li wrote:
> hi netters,
Hello,
> I'm curious if there's any smart code to calculate the "distance"
> between the matches in a text.
> Suppose I have a text like this:
> syhk...yes...uhg;ka=...yes...yiealg.yes...ghe;a...yes...
> Apparently it has multiple words of "yes". I'd like t
ers@perl.org
Subject: count the characters between the matches
hi netters,
I'm curious if there's any smart code to calculate the "distance" between
the matches in a text.
Suppose I have a text like this:
syhk...yes...uhg;ka=...yes...yiealg.yes...ghe;a...yes...
hi netters,
I'm curious if there's any smart code to calculate the "distance" between
the matches in a text.
Suppose I have a text like this:
syhk...yes...uhg;ka=...yes...yiealg.yes...ghe;a...yes...
Apparently it has multiple words of "yes".
I'd like to know how many characters there