This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
I'm struggling with a RegEx issue - I have a template that users are using to provide information, but sometimes the user will delete the last few lines if it doesn't pertain to them. See the template and two examples below; in t he second example, the user has deleted the Amount 2 line because it doesn't pertain to them, whereas in the first example, the user has left the Amount 2 line.
Name: John Smith
Amount 1: 500
Name: Jack Smith
Amount 1: 600
Using the RegEx Parse expression "Name:(.+)^Number:(.+)^Amount 1:(.+)^Amount 2:(.+)" leaves anything that's like the second example un-parsed since it won't find the Amount 2 line, and I can't quite figure out how to get the expression right. I've also tried RegEx Tokenize with ":(.+)", which only gives me the output from the Name line.
I can use the Text to Columns tool pretty easily, but wanted to try to tackle using RegEx.