Rob van der Heij wrote:
> But your solution does do delimiters inside the words,

Right, and that's what it turned out Alan was trying to do in the first
place:  Find a phrase that may contain delimiters, set off by delimiters
on either side of it.  I would have changed "word" to "phrase" except
that I was leaving as much of his code intact as possible to make it
easy to compare.

My solution is equivalent to his, just without the need to choose a safe
character to substitute for the target phrase.  Note that neither will
find a phrase that starts or ends with a word delimiter that abuts
another word.  In Alan's example of searching for A(I), he wouldn't find
it in the context A(I)B(J).  To handle cases like that, you'd test the
first and last characters of the phrase, and omit the appropriate VERIFY
stage when either is in the list of word delimiters.

¬R

Reply via email to