in reply to Re: searching for strings
in thread searching for strings

Next, if you use substr to look at the last character of 2 strings, the first n-1 characters have to be equal and the last characters have to differ by 1 when compared using ord, or the strings aren't a match.

That doesn't work for 'BBC49' and 'BBC50'.

Also, the process you are describing is O(N2). Feasible, but impractical for large lists.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."