I think logfile analysis is a perfect example. Regex could be the perfect tool for one-shot analysis of logs. But if you are writing an actual commercial application to do logfile analysis, regex is probably not the right tool.
What would you use in the actual commercial applications?
I have seen people try to replace regexes with sequences of splits and accesing hardcoded field numbers. This can inmprove readability in the simple cases, but makes code much more fragile in the complex cases.
Another approach I have seen is a full featured lexer. Looks clean and very fadt, but in my experience is an overkill for most tasks
I have seen people try to replace regexes with sequences of splits and accesing hardcoded field numbers. This can inmprove readability in the simple cases, but makes code much more fragile in the complex cases.
Another approach I have seen is a full featured lexer. Looks clean and very fadt, but in my experience is an overkill for most tasks