Hi,
How can I extract the name from this by eliminating the date and time stamp:
input | Required Output | |
A2B_EF_PQ_19072019_1520 | A2B_EF_PQ_ | |
ABC_DE_QR_19072019_1520 | ABC_DE_QR_ | |
Thank You!
Solved! Go to Solution.
Assuming the pattern at the beginning of the string is always the same - 3characters_2characters_2characters the below Regex will work as well
(.{3}\_.{2}\_.{2}\_)
Two ways to do this without Regex:
1. Assuming DateTimeStamp part is always the same length (as it should be), remove the 13 characters off the end:
2. Split field on the '_' and then reconstruct using the fields you need
Alternatively you want to remove the the last part using RegEx. The code for this would be:
Using the RegEx tool to Replace this with nothing or using RegEx_Replace() function in formula tool.
Hope this helps. Let us know how you get on.
Luke