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
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution