I am currently trying to split up lines of data using excel and VBA with regex to match patterns. All of my data is in one column with each row needing to be split into 3 parts.
My question pertains to the use of regex and how exactly terms work next to each other and what causes the next term to be used.
For instance, I have a line that reads:
"([A-Z]{3})(\W{5,})(.+)(\|\d\.\d)"
Should I read this as "Any 3 capitalized letters followed by at least 5 non-word characters, then take everything up to and including bar digit dot bar(no further)"? Or is the .+ going to just sprawl till the end of my data until it hits a line break?
I guess what I am wondering is if a new term will interupt a previous term (such as with .+ till "|digit.digit" above).
Any assistance in clearing this up for me would be super appreciated, thank you in advance.
Edit: Example
ABC|^-\%!lkaddghlk shfdahah|$^~436346dghdhg|^dgf^356||P|7.7XYZ~^!HYU52
Would this capture only
ABC|^-\%!lkaddghlk shfdahah|$^~436346dghdhg|^dgf^356||P|7.7
Because the last term is |digit.digit or would it capture everything because of .+ in the 3rd capture group?
Edit:
Thanks everyone in the comments, your feedback really helped me out!