Closed yjmantilla closed 3 years ago
I vote for using an already established technique like regex because people already know this and creating your own parser always looks easier than it is in the end
@stebo85 I had already implemented the custom parser; it works well enough, but the point of regex being the standard is a good argument. I do find the custom parser more intuitive for non-technical users.
I will try to implement the regex one and maybe put the whole parsing backend through regex, that is , translating the percentage notation of the custom parser to a regex pattern instead of being a parser itself. That way all is done through regex and the percentage notation is optional and only for non-technical users.
closing this since it is already implemented in regex and the percentage notation translation to regex is also already implemented.
So for parsing the filepath I originally had in mind something like this functionality from mp3tag:
Basically the user inputs the pattern using percentages to delimitate the fields.
This is also possible with regex like this:
Each strategy has their strength and weaknesses:
As of now I'm supporting the custom parser but I think supporting regex will allow more flexibility for power users.