I need to parse the field Text.
But I only want to parse those rows in text that meet a certain pattern.
The target rows will always contain all caps.
The target row has two groups I wish to pasre.
- Out_1 (group 1) is an identifier that is 3-4 digits long. 99 out of a 100 it starts with a \d. 99 out of a 100 it will include both numbers and letters. BUT, it can sometimes only be letters.
- Out_2 (group 2) is the name of the item. It will always be in all caps. But it can contain punctuation and special characters (-, &, () etc.)
Using the Regex Parse tool i tried the following expression:
^([A-Z0-9]{3,4})\s([A-Z\s&-]*[A-Z])$>>>> This works 99.9% of the time. BUT in the case where Text = "food insecurity" the above expression ignores the capitalization requirement and returns "food" in Out_1 and "insecurity" in Out_2. This is not what I want. What am I doing wrong?
Desired Outcome....
| Text | Out_1 | Out_2 |
| 1A2Y TACO - CRUNCHY | 1A2Y | TACO - CRUNCHY |
| 2500 | | |
| Unjustified growth | | |
| BSIM TRAINING OPS | BSIM | TRAINING OPS |
| food insecurity | | |
| 111 FIELD OPS | 111 | FIELD OPS |
| 465464 | | |