In my daily work, I am required to parse text generated by various systems. One such system generates a data entry audit trail with output that looks like the text below. When I need to compare the old value entered to the new value entered for a given datapoint, I search the audit trail for the latest entry prior to the current entry based on an an audit date. Once I have that specific audit entry, I search for the specific data entered. Since I can count on the validated system that produces the audit trail to output the audit entry in a specific way, i.e. "User entered 'some value'", I can use regex to extract the value. I also need to find where the user has entered an empty value.
The purpose of this tutorial is to detail how, ((?<=\').*(?=\'))|(User entered empty\.)
, the regex or regular expression pattern for this specific search works.
Sample Text
User entered '01 Jan 2019'
User entered 'Grade 2: Moderate (GRADE 2)'