[sword-devel] Announce: Sword/PDA for the Agenda PDA

Chris Little sword-devel@crosswire.org
Mon, 22 Oct 2001 10:13:27 -0700

> >But with regular
> >expression searches, the index-based compression would 
> increase search 
> >times even more because we'd end up having to reconstruct ever verse 
> >anyway.
> >
> Maybe you can use the index even for RE-based searches:

> For regular expression-based search, the only change is that 
> instead of 
> looking up words in the dictionary directly, you select all 
> words in the 
> dictionary that match your regular expression(s).  Then you 
> can convert 
> that set of words to their corresponding indexes and search 
> for verses 
> containing those indexes using the appropriate boolean evaluations. 
>  Unless I'm missing something, you can use the index either 
> way without 
> reconstructing the actual verse text while searching.

Would that be possible for a RE that involved crossing a word boundary?
Something like /\<Jesus \w+d\>/, for example.  I suppose you could split
up the RE itself by word boundaries, collecting a list of words that
match /\<Jesus\>/ and words that match /\<\w+d\>/, then finding all
instances where they come in order, separated by spaces.  But then you
have to account for \s+ and .+, at which point I would give up and just
reconstitute the whole verse string. :)