9,886,267 members (38,545 online)
Visit CodeProject.TV
Discuss CodeProject.TV
Sign in
Email
Password
Forgot your password?
Sign in using
home
articles
Chapters and Sections
>
Search
Latest Articles
Latest Tips/Tricks
Top Articles
Beginner Articles
Technical Blogs
Posting/Update Guidelines
Article Help Forum
Article Competition
Submit an article or tip
Post your Blog
quick answers
Ask a Question
View Unanswered Questions
View All Questions...
C# questions
ASP.NET questions
VB.NET questions
C#4.0 questions
C++ questions
discussions
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work & Training Issues
Design and Architecture
ASP.NET
JavaScript
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
Adobe Technologies
C#
Free Tools
Objective-C
Ruby On Rails
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
.NET Framework
Mobile
VS 11 & .NET 4.5
Sharepoint
Silverlight / WPF
Visual Basic
Web Development
Site Bugs / Suggestions
features
Component & Service Catalog
Competitions
News
The Insider Newsletter
Newsletter archive
Surveys
Product Showcase
Research Library
CodeProject Stuff
community
The Insider News
The Lounge
The Weird & The Wonderful
The Soapbox
Press Releases
Who's Who
Most Valuable Professionals
Company Listings
Non-English Language
>
General Indian Topics
General Chinese Topics
help
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
Site Map
Advertise with us
Employment Opportunities
About Us
Search within:
Articles
Quick Answers
Messages
Product Catalog
Comments by Ronald M. Martin (Top 3 by date)
Deleted
Ronald M. Martin
-
29 Feb '12 - 13:06
View
So Regex("^.*?$") is not faster than Regex("\n"), as you originally stated and Regex("^.*?$") is also slower than Regex("^.*$"). The thing that originally confused me was the use of "?" as a trailing qualifier applied to quantifiers. It's syntactically odd in that it requires look ahead, much as two-character operators in C# or C++. This type of syntax is generally handled lexically, as if the character pair represents a unique character (token) in the grammar. Reading the documentation from top to bottom, I stopped when I matched "*" and "?" separately. Thanks for clearing this up for me.
Deleted
Ronald M. Martin
-
28 Feb '12 - 9:50
View
Let me rephrase my question. Assuming that your syntax (@"^.*?$") is valid, does it produce a different result than (@"^.*$")?
Deleted
Ronald M. Martin
-
27 Feb '12 - 23:27
View
I don't understand the use of the question mark (?) in this speedup. The question mark is supposed to represent 0 or 1 occurences of the previous element. In this case, I take the previous element to be the dot (.), representing any character, quantified by the star (*), representing 0 or more occurrences (of any character). I don't know what adding another quantifier (the question mark) means in this context or if it's even allowed. If it is allowed and actually helps, please explain what it does, since I'm clearly missing something.
Advertise
|
Privacy
|
Mobile
Web01 | 2.6.130516.1 | Last Updated 1 Jan 1900
Copyright ©
CodeProject
, 1999-2013
All Rights Reserved.
Terms of Use
Layout:
fixed
|
fluid