Indexing mail list messages
Dave Cragg
dcragg at lacscentre.co.uk
Fri Jul 22 10:32:11 EDT 2005
On 22 Jul 2005, at 13:55, Alejandro Tejada wrote:
>
> Did you have a regex that could handle these
> words with punctuation?
No regex, but I've used this sequence of replace calls in the past.
replace quote with space in tData
replace "(" with space in tData
replace "[" with space in tData
replace "{" with space in tData
replace ")" with space in tData
replace "]" with space in tData
replace "}" with space in tData
replace "," with space in tData
replace ":" with space in tData
replace ";" with space in tData
replace "." with space in tData
replace "?" with space in tData
replace "!" with space in tData
replace "*" with space in tData
replace "#" with space in tData
replace "/" with space in tData
replace "`" with space in tData
However, you should probably give this some thought. For example, if
you replace "." and "/", you will break up urls which may not be a
good idea in all situations. In that case, it might be better to just
replace a "." that is followed by a space or return.
replace ". " with space & space in tData
replace "." & return with space & return in tData
The reason for replacing with an equal number of characters is that I
understand it's much faster. (From previous discussion on the list.)
Cheers
Dave
More information about the use-livecode
mailing list