ServiceNow Interview Question

Write a regex that parses out the relevant information from the above logs. You can use https://regexr.com/ to test your Regular Expressions. The regex should work for each line separately.

Interview Answer

Anonymous

Mar 28, 2022

\[(?P\d+)\]\s*(?P.*)-\s*(?P.*)