I have got this string:
tcp://10.0.0.1:11211?rep=12&timeout=12
so I tried with:
(tcp://.+):([0-9]+)\?.*\&+timeout=([0-9]+).*
I need to retrieve:
tcp://10.0.0.1that is the server11211that is the porttimeoutparameter value (in this case 12)
The tcp://10.0.0.1:11211 part exists in any case and so I need it, but the query part is not mandatory, so my problem is that if ? or timeout or = don't exist the regex doesn't retrun anything.
Due to my inexperience I'm not able to solve this problem,how can I achive this result?