Hi There,
How would I split the data using the RegEx Function?
I need to split the header from the Body.
The start of the Body would be Where it says "Subject"
Not very familiar with this function and not sure what is the correct regular expression to use to achieve this. Thank you
Solved! Go to Solution.
Hey @HongAlt you should just be able to use the RegEx tool in parse mode with the following:
Subject:\s(.*)
This will capture everything after Subject:
You can also use regular string functions. Here's an example of both with a dummy string I quickly mashed out on the keyboard as you provided a screenshot:
Input string:
String functions:
RegEx:
Hi Thank you for responding and providing such details on it.
I attached a photo of what they want the output to be like.
The "Subject:\s(.*)" you showed was able to output just the email body.
If it is not too much trouble, what would be the expression to get the output shown in the picture. Thank you in advance
@HongAlt , please use the below configuration to get your desired result. Sharing the updated workflow
Hi @HongAlt, no problem! I've edited my original post above and also uploaded the amended workflow which gets the outcome you're looking for - hope that helps!
As a note: The reason I provided the string functions as well is because it's generally best to avoid using RegEx if possible, due to it being a bit more computationally expensive. Thanks!
Thank you so much appreciate it, I was able to generate the results, with the addition of a non-greedy expression on the first part.
Glad it worked @HongAlt! If you got the outcome you were after, feel free to mark helpful answers as a solution so that others with the same issue can easily find it in future! If you still need any help or pointers then please feel free to shout up!
Hi @DataNath,
Thank you so much for all your help with the problem. I was hoping I could bother you one more time for assistance as I am quite lost regarding the expression on RegEx. As you said other methods might be easier but they require us to use RegEx to generate the results.
What expression would be used to parse the information to generate the results shown in the second photo? Thank you again
Hey @HongAlt are you able to attach a sample of the data, rather than a screenshot? Would be a lot easier to test/develop a solution with!