Great stuff here!
I’m fairly decent with basic Regex, but where I struggle with is with an example like below
Normally what I would have done is used a Regex pattern of
Which works great for Submission 1, but not Submission 2. Is there a way in regex to treat a string as optional? I.e I’d like Email:(.*) to be an optional match. i.e if not found just skip straight to the next possible match.
Gave that a try, but didn’t seem to work
It didn’t match any of the text in the string
This seemed to work for me
Thanks for pointing me in the right direction Jim!
EDIT: I just realized that Discourse is hiding the * in the first two group brackets. You can notice a difference between the text I pasted and the screenshot
I’m usually very good at making sure to use preformatted text for that.
My original text:
A better version:
When putting in code excursions try to escape any expressions with the code tool.