[Mono-list] C# Regular Expressions Help Urgent

Ivan Hawkes blackhawk@ivanhawkes.com
Thu, 14 Aug 2003 21:24:24 +0100


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

LaVey wrote:

| Hi Hugues,
|
| Thanks for the info.
| Btw do u know of any good tutorial site for regular expression?
|
| Best Regards,
| Nigil

Get the book by O'Reily Press on Regular Expressions. It's really
excellent, well thought out, and an interesting read. I have tried
various websites but they're not a patch on this book.

|
| ----- 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-----
|>
|
|
| _______________________________________________
| Mono-list maillist  -  Mono-list@lists.ximian.com
| http://lists.ximian.com/mailman/listinfo/mono-list

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQIVAwUBPzvv9/r1e7bH1pzBAQJDgQ//WS7xq6sq0PPv4nXIofKIWDUN32tEvEDd
/wyCklSkjmqsc+CvhaiOD4bk4ad5cv020C7Xz5b0OSnRPzVmcp5YKjWR/r3nwDoD
qfIRFPtXAMWPimg2MWTUj+Qi/G8GiKSxgsbFh/SwLNejLgPYLSeUQowpoepoq2fX
8dXlwsbL6UwvqHlXH0rYcrM2KUQFm9wOdyurjJfHv9vg9+qZ+40sDLJJL+7LqF4b
5w0ZWSYa6f6ZMWP2HvOE3LaejXwQf9eOqs+Kffr/R1m77oErMj2A7RXia4GplPHt
ydYLSyCuaYgMnCdRpcLEmWLJ3yWl/wVV0d8Uk0keWYVRqpkyJ0Y9mZdaJ1KboRub
SnByw8kP/zHRLOvMQQqzrJOTl7xmbuQxkov253tFt+A8z25KEDrWP+yO5uT2+Nun
4gzPq+hYS45GsCU2D3Ssv0Jbz0QV+bSL7TYcfV0bnlh7gnnl5eMIx7S4oppkqb9A
LwNfL31jdkjn+CF+zcDikfGK1xxUOb9Th0oQM9WO8x3jiky5np/LoyquEar5UlLE
PAffFk2oM172YAeFzCcSqBO0Xz4uI1Fha4AE/J04+8z6IP9d5BKp0cxKDysC7QVT
bQjGxSM5cKJRpX6c8trM6DNABkGDT680gnFUx0gzhX8E6jVdr/X4avlOF8ChZLnM
g2JqIpEcGQ4=
=lIcG
-----END PGP SIGNATURE-----