Browse thread
Fwd: Re: Text.get/Text.search in labltk
- David Thomas
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | David Thomas <david_hd@y...> |
| Subject: | Fwd: Re: Text.get/Text.search in labltk |
Whoops. The l+1 was an earlier experiment that hadn't been removed. It works the same whether it is there or not. > The code: > let rec printwords () = > match Text.search > ~switches:[`Regexp] > ~pattern:"[a-zA-Z]" > ~start:(`Atxy (0, 0), [`Wordend; > `Char > 1]) > text > with `Linechar (l, c) -> > Printf.printf "(%d, %d) -> %s\n%!" > l c > (Text.get > ~start:(`Atxy (l+1, > c), []) > ~stop:(`Atxy (l,c), > [`Lineend]) > text > );; ____________________________________________________ Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs