« first day (2170 days earlier)      last day (2773 days later) » 

11:00 PM
17
Q: Regular Expression Vs. String Parsing

DanAt the risk of open a can of worms and getting negative votes I find myself needing to ask, When should I use Regular Expressions and when is it more appropriate to use String Parsing? And I'm going to need examples and reasoning as to your stance. I'd like you to address things like readab...

 
@Aaron3468 Doesn't that mean that a pattern matcher needs to match to a regular grammar
 
11:26 PM
@VermillionAzure For your sanity, yes. But if you can express a non-regular language with clear switches between different patterns, you can still use a pattern-matcher by adding state. Imagine one that builds data structures; it might try building a dictionary/map when it sees [, a list/array when it sees (, and a tree when it sees {.
Honestly, I don't know enough to get much deeper than this in the discussion.
 
user1804599
11:43 PM
more adventures:
 
user1804599
 
user1804599
2500 µs!
 
user1804599
Oh wait, it's actually faster than JSON :v
 
user1804599
probably a failure in the benchmark
 

« first day (2170 days earlier)      last day (2773 days later) »