in reply to Re: Pattern match location finding
in thread Pattern match location finding

Downside of your approach is that you assume the query string will always be one character. diotalevi's approach does not suffer that limitation. Definately works with the test case feloniousMonk presented, but fM refers to 'B' as a query string implying that it could be multiple characters in some cases.

Replies are listed 'Best First'.
Re: Re: Re: Pattern match location finding
by feloniousMonk (Pilgrim) on Feb 18, 2004 at 21:06 UTC
    And in fact query string is always <= length of target string...

    Thanks for the help everyone, now I have some good suggestions to try out - they're all much better than my own earlier attempts. --