How to get a substring from a large string?
<p>I have a large string in the form of a query, like for example: 
"SELECT column_name1, column_name2, column_name3, column_name4 FROM table1 JOIN table2 ON table1.field1 = table2.field1" (the original query will have about 30 column names from joins of about 6-8 tables)</p>

<p>Now I just want the column names from this string. How can I achieve that?</p>

<p>Thank you in advance.</p>
