How to improve python regex pattern to capture arguments that are multi-lined

Dear devs,
I’ve previously written a converter for Photoshop ScriptingListenerJS.log files to python. I make use of regex patterns to isolate what i need. And I’m looking to improve the regex I currently have seen in the examples below on regex01.com.

Currently my regex doesn’t capture string entries that are multi-lined. This also happens when there xmpmeta tags involved. Any dev out there can help me improve the capture regex ?

Example capture multiline string values:

Example capture multiline XMP values:

I’m currently capturing the variable name, data type, and the arguments.
But my regex as is fails on those specific entries.

Single line (dot matches newline) and a non-greedy capture should do it for multiline strings.

1 Like

Looks like it could work for XMP too.

1 Like

HA! Great that worked! Much much improved this way. Thank you @ldunham1

1 Like