This question already has an answer here:
- My regex is matching too much. How do I make it stop? 5 answers
- Regex to first occurrence only? 4 answers
I need to extract the substring between "Design Brands > " and the first following pipe(|) character from of the following string:
"T-shirts|Brands > Port & Company|Design Brands > Montana Griz|Designs > TeamLB Griz > MTG31|T-shirts > TeamLB|T-shirts > Montana Griz"
This is within a google sheets function so I have to use Go's RE2 syntax
I would expect that the following expression would work
Design Brands > (.*)\|
However, the expression matches everything up to the last pipe in the string
"Montana Griz|Designs > TeamLB Griz > MTG31|T-shirts > TeamLB
"
instead of everything up to the first occurance of a pipe in the string. I cant seem to figure out how to isolate just "Montana Griz" within a capture group.
</div>