I need some help with regex. My start field is RAW. I can use regex to extract Line, Text and Amounts. Note Amounts equals the last three groups of numbers,
My current regex is (^\d+)\s(\D.*?)\s(\d+.*$). I also tried a reverse text on RAW to address some other issues. I then split Amounts using Split to Columns using \s.
PROBLEM
My regex Does Not Work for record #1 below when the Text field ends with a number.
RecordID | RAW | Line | Text | Amounts |
1 | 136 Indirect Fire Protection Capability Inc 2—Block 1 233512 162781 -70731 | 136 | Indirect Fire Protection Capability Inc 2—Block 1 | 233512 162781 -70731 |
2 | 137 Ground Robotics 18241 16360 -1881 | 137 | Ground Robotics | 18241 16360 -1881 |
3 | 183 Army Direct Report Headquarters—R&D—MHA 52108 49108 -3000 | 183 | Army Direct Report Headquarters—R&D—MHA | 52108 49108 -3000 |
4 | 199 This is a more typical example 20000 30000 10000 | 199 | This is a more typical example | 20000 30000 10000 |
Solved! Go to Solution.
Hi @hellyars
Here is my take similar to above with minor change which is highlighted which can accommodate space or hyphen or anything between numbers.
Workflow:
Hope this helps : )