Pete, Thanks, that was the way I thought I would have to go. Just was hoping there was an easier way :) I'd still like to see if it can be done in 1 *line* :) Thanks.
Cedric >Cedric Villat wrote: > > >I don't think there's any sane way to do this with a single POSIX regexp >(I think I could do it in one with a Perl RE, but it would be ugly); I'd >love to be proved wrong though. . > >bar=rereplace(foo, "([^0-9])\.([^0-9])", "\1 \2", "ALL") > >would be safe, but would miss (say) "a.5"; you don't say what you want >to do with multiple periods either... > >My inclination would be to do it in three bites: replace the periods you >*want* to keep with a character guaranteed not to be in your string, say >SOH, (you can always do a zero'th pass to strip such out), replace all >remaining periods with spaces and finally restore the periods you want: > >temp=rereplace(foo, "([0-9])\.([0-9])", "\1#chr(1)#\2", "ALL"); >temp=replace(temp, ".", " ", "ALL"); >bar=replace(temp, chr(1), ".", "ALL"); > >It's not what you asked for, but it *is* only one regexp :) > >-- >Pete Jordan ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:195760 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

