[Mono-list] C# Regular Expressions Help Urgent
LaVey
LaVey" <lavey@pacific.net.sg
Thu, 14 Aug 2003 21:02:58 +0800
Hi Hugues,
Thanks for the info.
Btw do u know of any good tutorial site for regular expression?
Best Regards,
Nigil
----- Original Message -----
From: "Hugues Lismonde" <h.li@skynet.be>
To: "LaVey" <lavey@pacific.net.sg>
Cc: <Mono-list@lists.ximian.com>
Sent: Thursday, August 14, 2003 8:42 PM
Subject: Re: [Mono-list] C# Regular Expressions Help Urgent
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> LaVey wrote:
>
> > hi there...
> >
> > I am having problems checking the following string...
> >
> > string str_Content="The day is <CheckOne> for me <CheckTwo> and so on..
";
> >
> > how do I create a regex pattern that matches my "<CheckOne>" and
> > "<CheckTwo> " within my str_Content in c#?
> >
> > regards,
> > Nigil
> Try:
>
> <CheckOne>|<CheckTwo>
>
> that will give you:
> Match 0 = <CheckOne>
> Match 1 = <CheckTwo>
>
> or if you want to have more checks:
>
> <([A-Za-z]+)>
>
> with the following result:
> Match 0: <CheckOne>, group 1: CheckOne
> Match 1: <CheckTwo>, group 1: CheckTwo
> ...
>
> So that a match will contain the whole block and the group will contain
> its name.
>
> If you are under Windows, you should try this tool:
> http://www.sellsbrothers.com/tools/#regexd
>
> - --
> Hugues Lismonde
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.1 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQE/O4PLT/UMb4JTLzoRAidHAJ0WfjG2i9z9ZkfTLxbjTwcdGztydQCfViFr
> 9GCSSSw5oZlPzPZOG3Btl2c=
> =eHU0
> -----END PGP SIGNATURE-----
>