Implementing logic in a different way I need to write a function which will do the following functionalities

I would get a string and a array as input parameters

The string would be like one of the following for example 

catalog 
level1Cats
level2Cats


The String array would be containing the data for the strings mentioned above for example

catalog:("12605")

level1Cats:("12605_For the Home") OR level1Cats:("12605_Clothing")

level2Cats:("12605_For the Home_Appliances")


Now if the String is catalog and the array is the one mentioned above then the output should be 12605.

If its is level1Cats then the output should be an array of the following strings 

12605_For the Home 
12605_Clothing


I wrote the following code to implement the above mentioned logic It's doing the functionality without a flaw, Can i implement the same in a different and a more efficient way?

public static String[] parseFQ(String fqField, String fqs[]) {

    List&lt;String&gt; prefixes = new ArrayList&lt;String&gt;();

    if(fqField != null &amp;&amp; fqField.length() &gt; 0
            &amp;&amp; fqs != null &amp;&amp; fqs.length &gt; 0) {

        //Get the fq which starts with given field name.
        for(String fq : fqs) {
            if(fq.startsWith(fqField)) {
                fqField = fq;
                break;
            }
        }

        boolean parsed = false;
        while(!parsed) {
            int quoteStart = fqField.indexOf("\"");
            int quoteEnd = (quoteStart &gt;= 0) ? fqField.indexOf("\"", quoteStart+1) : -1;
            if(quoteEnd &gt; 0) {
                prefixes.add(fqField.substring(quoteStart+1, quoteEnd));
                fqField = fqField.substring(quoteEnd+1, fqField.length());
            } else {
                parsed = true;
            }               
        }
    }
    //Return the prefixes array
    return prefixes.toArray(new String[]{});
}
Below code is more readable and no need of using our logic around single quotes.

String[] w = fqField.split("\"");
for (int i = 1; i &lt; w.length; i+=2) {
    prefixes.add(w[i]);
}