I am currently attempting to create a function that is able to transform a date format string such as
%d/%m/%Y %H:%n
where the variables are always denoted by a percentage sign followed by one character, into an array of tokens:
["%d", "/", "%m", "/", "%Y", " ", "%H", ":", "%n"]
However, I am struggling to find a straightforward approach to accomplish this task.
Are there any techniques, patterns, or existing code examples that could help me achieve this?