How can I get one specific uri parameter from an URL? For example my url
/search?q=foo&oq=bar&aqs=chrome&client=android&sourceid=chrome-mobile&ie=UTF-8
Now I want only return the q parameter (foo). My solution was to try it with a substring till indexOf & but there is a problem, if I try the same on an url without an & character.
Need to do it without a special lib, need it for kibana w/ painless.