Re: count the characters between the matches

2006-10-24 Thread Dr.Ruud
"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

Re: count the characters between the matches

2006-10-24 Thread Rob Dixon
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

Re: count the characters between the matches

2006-10-23 Thread Jeff Pang
> 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

Re: count the characters between the matches

2006-10-23 Thread Chris Charley
- 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

Re: count the characters between the matches

2006-10-23 Thread John W. Krahn
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

RE: count the characters between the matches

2006-10-23 Thread bou, hou \(GE Money, consultant\)
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...

count the characters between the matches

2006-10-23 Thread zhihua li
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