jbv wrote:
Hi list,
Is it possible to use regEx to remove spaces before and
after quotes, and, if yes, how ?
Example :
my " beautiful " laundrette
becomes
my "beautiful" laundrette
This was harder than I thought it would be. I have something I think
works, but it isn't elegant and others can probably improve on it:
on mouseUp
put fld 1 into tData
put replaceText(tData,"\s{2,}",space) into tData --replace multispaces
replace cr with " **CR** " in tData
repeat for each word w in tData
get w
if it contains quote then
replace quote with empty in it
get quote & word 1 to -1 of it & quote
end if
put it & space after tText
end repeat
delete last char of tText
replace " **CR** " with cr in tText
put tText into fld 2
end mouseUp
--
Jacqueline Landman Gay | [EMAIL PROTECTED]
HyperActive Software | http://www.hyperactivesw.com
_______________________________________________
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