Given a search string like (eg. Github Issue Search):
subject: hi bye text: yes no
Parse it:
input: subject: hi bye text: yes no
key: subject
value: hi bye
key: text
value: yes no
This repeatedly tries searching the string with this regex: /(\w+):\s?/
.
I'm pretty sure there's a better way of doing this.