Kenton Brede wrote: > On Wed, Feb 25, 2004 at 05:52:19PM -0000, Rob Dixon ([EMAIL PROTECTED]) wrote: > > Kenton Brede wrote: > > > > > > > I'm having trouble counting the number of specific substrings within a > > > > string. I'm working on a bioinformatics coursework at the moment, so my > > > > string looks like this: > > > > > > If you don't get an answer to your question this is probably why - > > > > > > http://learn.perl.org/beginners-faq#2.2%20%20what%20is%20this%20list%20_not_%20for > > > > Hi Kent. > > > > Which of that list did you think was relevant? > > "Homework" am I wrong? He said he was working on "bioinformatics > coursework." If I'm wrong I apologize for opening my "mouth." > Kent
I see nothing wrong with openly seeking input on any question. That is part of the process of active learning. What I find objectionable is people looking for completed assignments, or who just want to plug their data into a template, without trying to understand for themselves why the code works. Actually, I think the OP had a pretty good question. I am not sure if the standard regex would work for what he is trying to do. We did have an extensive thread on a very similar problem in the last couple weeks, I believe. My guess here, since the desired string length is constant, that a simple progressing forward through the string testing substrings of two for equality would do the job in a straightforward manner. Most of the veterans on this list are pretty skillful at providing help in ways that still require active participation on the part of the person posting. There is an art to it. Joseph -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>