C#

Moderators: None (Apply to moderate this forum)
Number of threads: 2722
Number of posts: 5749

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Is there something faster than .|[\r\n] in RegExp ? Posted by ektoras on 20 Apr 2005 at 12:41 AM
Is there something faster than .|[\r\n] in Regular Expressions ?
Report
Re: Is there something faster than .|[\r\n] in RegExp ? Posted by IDK on 20 Apr 2005 at 5:47 AM
: Is there something faster than .|[\r\n] in Regular Expressions ?
:
Whait! What does it do?
Am I correct if I say that you want
to get if there is a linebreak in a
string?

Then you could use
String.indexof

I don't know regex.
=============================
The PROgrammer Niklas Ulvinge

Report
Re: Is there something faster than .|[\r\n] in RegExp ? Posted by ektoras on 21 Apr 2005 at 9:01 AM
: : Is there something faster than .|[\r\n] in Regular Expressions ?
: :
: Whait! What does it do?
: Am I correct if I say that you want
: to get if there is a linebreak in a
: string?
:
: Then you could use
: String.indexof
:
: I don't know regex.
: =============================
: The PROgrammer Niklas Ulvinge
:
: I want to match multiple-line comments from /* to */ so I use:
Regex regex = new Regex("/\\*(.|[\r\n])*?\\*/");

Report
Re: Is there something faster than .|[\r\n] in RegExp ? Posted by IDK on 21 Apr 2005 at 12:15 PM
: : : Is there something faster than .|[\r\n] in Regular Expressions ?
: : :
: : Whait! What does it do?
: : Am I correct if I say that you want
: : to get if there is a linebreak in a
: : string?
: :
: : Then you could use
: : String.indexof
: :
: : I don't know regex.
: : =============================
: : The PROgrammer Niklas Ulvinge
: :
: : I want to match multiple-line comments from /* to */ so I use:
: Regex regex = new Regex("/\\*(.|[\r\n])*?\\*/");
:
:
If you want the fastest way I think:
Do it manualy!
With a for statemant that goes thru
the whole thing...
=============================
The PROgrammer Niklas Ulvinge




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.