On 22/02/2008, Ronan Klyne <ronan(_dot_)klyne(_at_)groupbc(_dot_)com> wrote:
> matches('hello', 'a?e?f?m?r?r?')"
>
> returns true, which suggests the regex needs work... but I don't know
> regex's well enough to correct it.
>
>
Add a caret and a dollar to mark the beginning and end of the string,
otherwise it's allowed to match a zero length substring
matches('ehllo', '^a?e?f?m?r?r?$')
aha - well done Ronan!
I've now implemented Mike's solution and it performs about the same as
the recursive function approach (ignoring the pre-process step of
sorted the words in the word list)...
cheers
--
Andrew Welch
http://andrewjwelch.com
Kernow: http://kernowforsaxon.sf.net/
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--