I have a problem I need to solve in making a script that prints the information between the first two commas after a designated string in a text file I'm looking through. For example, if I'm searching:
So, I went to the $string and I wanted to buy a book, but it was too expensive,
would print " but it was too expensive". The commas may be on different lines, and I may need to print several instances of this per document I'm searching through.
Does anyone know a good way of doing this? Thanks in advance for any help.