I’ve written a small and simple tokenizer but without use of regular expressions.
I starts at first index and iterates through every character until end and creates the required tokens.
I showed it to a colleague that said it would’ve been much simpler to do /that/ with regex without going into any depths.
So should I rewrite and expect it to be “better”?
Two questions you should ask:
a) If something should change, which one would be the easiest to maintain?
b) If it is working and you don’t expect any change, do you really want to spend more time on it?
I’m sure the performance differences are small enough to ignore. The programming experience, and minimizing potential bugs, is the most important issue.