This may be more understandable than the first regexp I posted. Each regex [^.]+ is simply looking for one or more characters that do NOT include a '.'
Code:
'[^.]+' --> By default, SUBSTR will start at the first character and
look for the first occurrence (group) of character(s),
therefore I did not need include a 1,1 after this
expression
'[^.]+',1,2 --> Starting at the first character of the string, look
for the second occurrence (group) of character(s) that
do NOT include a '.'
'[^.]+',1,3 --> Starting at the first character of the string, look
for the third occurrence (group) of character(s) that
do NOT include a '.'
In the original regex I posted, since I used a '*' (which indicates zero or more), the counts were different since it was including the '.' in the data as a hit.
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
Bookmarks