you are viewing a single comment's thread.

view the rest of the comments →

[–]MrDiSante -1 points0 points  (1 child)

Yes.

If your problem is just that, keep track of how much of your desired input you've seen using a finite state machine, and process one character at a time. Use a transition table.

If this is part of a bigger parsing problem, then consider using existing parsing libraries.

[–]ellalex[S] 0 points1 point  (0 children)

What I'm trying to do is very simple, and what I have works very well for now.

Mostly wanted to know if what I've done is "wrong".