Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
Use this tag for code that parses its input, or that is source for a parser generator such as yacc or lex.
3
votes
Struct that parses full name into first name, middle name, last name and suffix
The answer from Chuck covers a lot of good ground. I'd take your code a step further and make your first name, last name, middle name, and suffix their own types (structs) as well. That way, your Full …
4
votes
2
answers
203
views
Representing and Parsing an Open or Closed Range
I would like to represent a numeric range in C#. Either open-ended, such as "up to 35" or "100 on up" or closed-ended, such as "34 to 65". I'd like to represent the open end with NULL. Further, I'd li …
5
votes
Look 'ma, I can read code
Couple of things I would do to the AttributeParser abstract factory:
Bring the creation of the Regex out of the Parse method since it is the same each call.
The if..else each with a return in it is …
1
vote
Tokenizing each document in a large document of documents
In addition to the great answers from almaz and Robert Wagner, I would do one more thing: make the Regex compiled and pull it out of the loop. So your original code looks like:
newitem = Regex.Replac …
6
votes
Accepted
Parsing small data into tuples
As usual, anything I have to note about your implementations are pretty minor:
The IList<string> itemNames parameter in the Deconstructor constructor parameters can be IEnumerable<string> itemNames …