Given the search query string: 'field:value other_field:other_value keyword' How would you go about extracting the various fields, values, and plain keywords? A regular expression based solution could be to define a regex for each field, e.g. field:([^ ]+), and then match all occurrences in the input, removing the match after it has been processed. While this approach has several obvious disadvantages, I have seen it in practice. Some of the more obvious drawbacks result from the choice to re...