Dear community,
Please I am having some difficulties using Regex to extract a specific part of a string field within my Data.
I have for example a field with the following string: 99999998_20180501_001_21_11+22_ORDERS
I will like to extract the Year and Month (marked in green) for each single record within that field. The field ist automatically generated and the date changes depending on the date of input of the record (YYYYMMDD), else the format remains the same for all the records. Only exception could be the prefix that could vary between "ORDERS" and "OFFERS"
I will appreciate your assistance.
Thanks
Solved! Go to Solution.
Hello @Desa19,
I've put you two ways to get to the same info with some extra columns to classify by date.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Regards
Hi @Desa19,
You could use the following expression to parse the YearMonth into a new column:
\d+_(\d{6}).*
If this solves your issue please mark the answer as correct, if not let me know! I've attached my workflow for you to download if needed.
Regards,
Jonathan
@CharlieS @Jonathan-Sherman @afv2688,
please accept my appreciations for the timely assistance, I just successfully pulled the right results with all three options.
@CharlieS @Jonathan-Sherman: your proposed solutions, though slightly different approaches nail the problem on the point with the exact solution.
@afv2688's Option broadens my scope further on how to correctly format the Regex Tool for other possible outputs.
Thanks for all
User | Count |
---|---|
19 | |
15 | |
15 | |
9 | |
8 |