caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] How to use pcre
@ 2001-09-06 13:03 Johann Spies
  2001-09-06 13:29 ` Markus Mottl
  0 siblings, 1 reply; 12+ messages in thread
From: Johann Spies @ 2001-09-06 13:03 UTC (permalink / raw)
  To: ocaml mailing list

I have had very limited exposure to Perl and would like to use pcre
after reading much about it on this list.

I have looked in the documentation that comes with it, but can not
find simple examples on how to use it.  The example programs are very
impressive, but do not help me a lot to know how to use simple things
like string substitution.

Can somebody please give me a simple example on how to do the following:

How do I change a string (let s = "abcde";;) to "abcDe"?

In other words what would be the pcre equivalent of python's 

>>> t = re.sub('d','D',s)
>>> t
'abcDe'

Regards.

Johann
-- 
Johann Spies          Telefoon: 021-808 4036
Informasietegnologie, Universiteit van Stellenbosch

     "Behold, I stand at the door, and knock; if any man 
      hear my voice, and open the door, I will come in to 
      him, and will sup with him, and he with me."       
                                   Revelation 3:20 
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2001-09-07  6:59 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-09-06 13:03 [Caml-list] How to use pcre Johann Spies
2001-09-06 13:29 ` Markus Mottl
2001-09-06 13:44   ` Johann Spies
2001-09-06 14:21   ` [Caml-list] How to use pcre (2) Johann Spies
2001-09-06 14:45     ` Markus Mottl
2001-09-06 19:51       ` [Caml-list] How to use pcre (3) Johann Spies
2001-09-06 21:12         ` Nicolas George
2001-09-06 21:23         ` Markus Mottl
2001-09-07  6:59           ` Johann Spies
2001-09-06 21:28         ` Gerd Stolpmann
2001-09-06 21:55           ` Markus Mottl
2001-09-06 22:14           ` Alain Frisch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).