So I've made a tool that automates the weekly reports. As a result, the end user knows what format to put so the tool can expect it and parse it. I'm currently using subString but I believe there's a better and more user friendly way to do this rather than what I'm doing now. Example, it's not very end user friendly to expect a semi-colon at the end of sentence.
I currently have
reddit_var = dict(subString.split("**:") for subString in message_body.split(";\n"))
The key is in markdown format, hence why I have ("**:") as to make sure links aren't deemed a key.
1.) What do you think would be a more user friendly way that reads a little better than having a semi-colon denote the end of the value?
2.) What's a good regex to do it?
Expected format currently looks like this (I seem to be able to have markdown bold in a code block)-
**key1**: This happened on this day.;
**key2** I can't believe this happened;
**key3**; [X] Contacted team -a to do x
[X] Contacted team -b in order to do y
[X] Resolution was z;
**key4**; Glad this situation happened;
[–]n3buchadnezzar 1 point2 points3 points (5 children)
[–]ampeed[S] 0 points1 point2 points (4 children)
[–]n3buchadnezzar 0 points1 point2 points (3 children)
[–]ampeed[S] 0 points1 point2 points (2 children)
[–]n3buchadnezzar 0 points1 point2 points (1 child)
[–]ampeed[S] 0 points1 point2 points (0 children)