* Fwd: Re: Text.get/Text.search in labltk
@ 2005-07-24 18:42 David Thomas
0 siblings, 0 replies; only message in thread
From: David Thomas @ 2005-07-24 18:42 UTC (permalink / raw)
To: caml-list
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-07-24 18:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-24 18:42 Fwd: Re: Text.get/Text.search in labltk David Thomas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox