Split Variable in two at "return"?

I have a variable that always has two lines separated by a carriage return (or "return"?). I'd like to split in to two local variables. My feeble attempt did not work. Can someone show me the proper solutions?

Example original variable:
John Doe
5/1/1938-4/5/2018

Goal:
Local_1 = John Doe
Local_2 = 5/1/1938-4/5/2018

You need to use Search using Regular Expression action.

RegEx:
^(.*)[\n\r](.*)

Note that the RegEx allows for EITHER a linefeed (\n) OR a return (\r) as the line separator. Linefeed is the most common today, but you will still sometimes see return used.

image


image


BTW, in the future, please put all data in a Code Block so that all characters are properly preserved on the web page.

Questions?

3 Likes

Thank you so much! I'm sure I'll have questions after I try to digest all that you've shared.