Using regex for an optional string

This seemed to work for me

Name:(.)\n(Email:(.)\n|)Phone:(.*)

image

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