Hi. I am trying to use the RegEx Tool to parse the following source data:
| Doe, J |
| Smith, K::abc123::500 |
| Chan, L::abc567::500 |
The pattern of data is that 1) it may contain the substring "::abcXXX::500", 2) if it does, only the "XXX" part will vary from one record to another. And I'd like to parse the data into 2 columns like this:
| Doe, J | |
| Smith, K | abc123 |
| Chan, L | abc567 |
I used this expression in the RegEx Tool
(.*?)\:\:(\w*)\:\:
and was able to correctly parse the last 2 records. But for the first record, it's giving Nulls for both columns. How should I modify the expression to make that substring "optional"?
Thanks in advance!