Hello,
I have a field called 'Work Notes' that looks like below. I'm trying to use the RegEx tool to retrieve only the 'Latest Work Note'. I'm able to identify the dates using the pattern below, but I'm struggling to retrieve all string up until the second occurrence of the pattern. Can someone please advise?
(\d{2}-[[:alpha:]]{3}-\d{4} \d{2}:\d{2}:\d{2} - )
Work Note | Latest Work Note |
10-Jan-2020 12:00:00 - John Doe (Add a Work Note) Met with lazy dog, the quick brown fox has in fact jumped over the him. Closing this inquiry. 09-Jan-2020 04:55:00 - Jane Deer (Add a Work Note) Still trying to speak with dog to confirm whether fox has in fact jumped. 06-Jan-2020 15:38:00 - Jerry Delgado (Add a Work Note) Opened this inquiry to see if the quick brown fox has jumped over the lazy dog? | 10-Jan-2020 12:00:00 - John Doe (Add a Work Note) Met with lazy dog, the quick brown fox has in fact jumped over the him. Closing this inquiry. |
08-Jan-2020 17:00:00 - Rupert Smith (Add a Work Note) Closing this request - it is a duplicate of request ABC123. | 08-Jan-2020 17:00:00 - Rupert Smith (Add a Work Note) Closing this request - it is a duplicate of request ABC123. |
[Null] | [Null] |
Thank you!!
Solved! Go to Solution.
Hi @ericamoody
You could certainly work some more on a RegEx expression that just takes the string up until the second date, but came up with a quick variation that can provide some additional detail even. I used another RegEx to replace dates as a separator (the "|" character) so that you can view all work notes for each, and then limit to the latest if desired.
Feel free to check out the attached workflow
Thank you so much @NickSm ! This is very helpful.
Thank you @fmvizcaino!! This is exactly what I was looking for! 😄