I am looking for a way to parse URL without queryString using Regular expression.
i have url like "http://abc.com/csd?/aaa/bbb"
expected is like "http://abc.com/csd"
Anybody help me on this.
I am looking for a way to parse URL without queryString using Regular expression.
i have url like "http://abc.com/csd?/aaa/bbb"
expected is like "http://abc.com/csd"
Anybody help me on this.
You could use Substring and IndexOf
var someString = "http://abc.com/csd?/aaa/bbb";
someString.Substring(0, someString.IndexOf('?') - 1);
while this does not fully comply with the requirements stated in your question, it might be an easier approach - if actual implementation does not need to be RegEx.