I have a text file that has some data like this :-
1/4 cup chopped green onion
1/2 teaspoon salt
1 Tbsp cream
1 teaspoon vanilla extract
I want to write a regexp such that my data is divided into groups of 3 like below:-
'1/4' 'çup' 'chopped green onion'
'1/2' 'teaspoon' salt'
'1' 'Tbsp' 'cream'
'1' 'teaspoon' 'vanilla extract'
It means that my regex should have:
- the first group before the first space,
- second group between the first and second space and
- third group after the second space till the end of line.
What is a possible way to do that?