Add ^ to valid query characters regex