preg_match(#(?:([a-zA-Z-]+):)?(?://(?:([a-zA-Z0-9_!$&\'()*+,;=._~%-]+)(?::([a-zA-Z0-9_!$&\'()*+,;=._~%-]*))?@)?([a-zA-Z0-9-._]+)(?::([0-9]*))?)?([a-zA-Z0-9_!$&\'()*@+,:;=._~/%-]*)(?:\\?([0-9a-zA-Z!$&\'()*@+,:;=._~%-]*))?(?:\\#(.*))?#, $uri, $m));
the regex above is used to match urls and the result is supposed to be m[1] = scheme m[2] = user m[3] = pass m[4] = host m[5] = port m[6] = path m[7] = queryString m[8] = fragment
it works well except when the queryString includes array, for example: ?ar[k1]=v1&ar[k2]=v2
My questions are: 1.What is the meaning of the sharp # in the regex 2.how can I modify the regex to make it matches the queryString include array