source: project/release/4/colorize/trunk/tests/quickrep.scheme.in @ 26711

Last change on this file since 26711 was 26711, checked in by sjamaan, 9 years ago

colorize: And another, slightly larger example from the wiki

File size: 509 bytes
Line 
1
2(use irregex) ; irregex, the regular expression library, is one of the
3              ; libraries included with CHICKEN.
4
5(define (process-line line re rplc)
6  (irregex-replace/all re line rplc))
7
8(define (quickrep re rplc)
9  (let ((line (read-line)))
10    (if (not (eof-object? line))
11        (begin
12          (display (process-line line re rplc))
13          (newline)
14          (quickrep re rplc)))))
15
16;;; Does a lousy job of error checking!
17(define (main args)
18  (quickrep (irregex (car args)) (cadr args)))
Note: See TracBrowser for help on using the repository browser.