Op dinsdag 22 jun 2010 12:05 CEST schreef Cecil Westerhof: >> The above while found-match loop does not modify this-line. >> The result is to find the last match on the line. > > I just hacked it fast to try it out. I only checked the standard case > where I changed the spaces at the beginning of the line with non break > spaces. I just tried something else and found this behaviour. As they > say: haste makes waste. There is also another bug, with certain input I > can get a value out of range. Next time I should verify my code and not > publish it immediately. :-{
I made a better version. There where some stupid mistakes in the first version. :-[ It is accessible through: http://www.decebal.nl/guile/sources/substituteExpression.scm When there is a better version I'll update it. And I am open to improvements. >> Also, (I'm not sure about it I would have to check string-replace, but >> my guess is that) the substituted text is (substring substitute-str >> start-match end-match), which will be different in the case of emacs >> code below. Was a stupid mistake. :-{ -- Decebal Computing Voor uw ICT oplossingen Cecil Westerhof Senior Software Engineer M ce...@decebal.nl W http://www.decebal.nl LinkedIn: http://www.linkedin.com/in/cecilwesterhof O< ascii ribbon campaign - stop html mail - www.asciiribbon.org Please do not send me Microsoft Office/Apple iWork documents. Send OpenDocument instead! http://fsf.org/campaigns/opendocument/