Hi Buddy,
Net Framework provides System.Text.Reg ularExpressions namespace for us to
work with Regular Expression.
You can get a simple general introduction of ".NET Framework Regular
Expressions" at the link below:
http://msdn.microsoft.com/library/de...us/cpguide/htm
l/cpconcomregular expressions.asp
But if you want to get a detailed reference of it, you can refer to the
JScript .NET's "Regular Expression Syntax" section, link:
http://msdn.microsoft.com/library/de...us/jscript7/ht
ml/jsreconbackrefe rences.asp
Finally, there is a web site special for Regular Expression, you can get a
tutorial from it at:
http://www.regular-expressions.info/tutorial.html
If I misunderstand your meanning, please feel free to tell me.
Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! -
www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
--------------------
| Content-Class: urn:content-classes:message
| From: "Bu***@Onlineho me.com" <an*******@disc ussions.microso ft.com>
| Sender: "Bu***@Onlineho me.com" <an*******@disc ussions.microso ft.com>
| References: <uw************ *@tk2msftngp13. phx.gbl>
<sS************ *@cpmsftngxa06. phx.gbl>
| Subject: RE: Regular Expression
| Date: Sat, 25 Oct 2003 05:30:30 -0700
| Lines: 70
| Message-ID: <02************ *************** *@phx.gbl>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Thread-Index: AcOa88b1uu7kg/nXT9Oyh6bxrarHf Q==
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Newsgroups: microsoft.publi c.dotnet.langua ges.csharp
| Path: cpmsftngxa06.ph x.gbl
| Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.langua ges.csharp:1940 05
| NNTP-Posting-Host: TK2MSFTNGXA08 10.40.1.160
| X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.csharp
|
| Thanks for the reply Jeffrey, I only want to know what's
| the Regular Expression parttern?
|
| Thanks,
|
| >-----Original Message-----
| >
| >Hi Buddy,
| >
| >I think you can do something like this:
| >
| >string str="[vbl] MyColumn{1, 100} Test";
| >Regex rg1=new Regex("\\s{4}") ;
| >string [] collection=rg1. Split(str);
| >Regex rg2=new Regex("My");
| >string new1=rg2.Replac e(collection[0],collection
| [1].ToLower());
| >string new2=new1+colle ction[1];
| >MessageBox.Sho w(new2);
| >
| >Hope this helps,
| >Jeffrey Tan
| >Microsoft Online Partner Support
| >Get Secure! -
www.microsoft.com/security
| >This posting is provided "as is" with no warranties and
| confers no rights.
| >
| >--------------------
| >| From: "Buddy" <Bu***@onlineho me.com>
| >| Subject: Regular Expression
| >| Date: Fri, 24 Oct 2003 23:18:50 +0100
| >| Lines: 15
| >| X-Priority: 3
| >| X-MSMail-Priority: Normal
| >| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| >| X-MimeOLE: Produced By Microsoft MimeOLE
| V6.00.2800.1165
| >| Message-ID: <uw************ *@tk2msftngp13. phx.gbl>
| >| Newsgroups: microsoft.publi c.dotnet.langua ges.csharp
| >| NNTP-Posting-Host: 81-1-69-6.homechoice.co .uk 81.1.69.6
| >| Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!
| tk2msftngp13.ph x.gbl
| >| Xref: cpmsftngxa06.ph x.gbl
| microsoft.publi c.dotnet.langua ges.csharp:1939 40
| >| X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.csharp
| >|
| >| Can someone please show me how to create a regular
| expression to do the
| >| following
| >|
| >| My text is set to
| >| [vbl] MyColumn{1, 100} Test
| >|
| >| I want a regular expression that sets the text to the
| following
| >| [vbl] testMyColumn{1, 100}Test
| >|
| >| Basically I want the regular expression to add the
| word test infront of
| >the
| >| word MyColumn and also remove 4 spaces after } and the
| word Test.
| >|
| >| Thanks
| >|
| >|
| >|
| >
| >.
| >
|