Click here to Skip to main content
15,887,485 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I have a URL string as
http://www.abc.com/CalcLDAP/Mul/3/4

Which basically calls a function named Mul,with i/p parameters as 3 and 4 respectively (written as in WCF REST based service).
Can you please provide me a RegEx using which I can
i.Extract the Method name(MUL)
ii.Another Regex using which I can retrieve the 1st input parameter(3).
iii.Another Regex using which I can retrieve the 2nd input parameter(4).

Thanks.
Posted
Comments
Sandeep Mewara 14-Mar-13 8:59am    
What have you tried so far by yourself?
avishekrc 14-Mar-13 10:09am    
I tried this one and got the last parameter(4):http://[^/]+/([^/]+)/[^/]+/[^/]+/?
But I need to extract the 1st parameter(3).
If I try http://[^/]+/([^/]+)/[^/]+/ it gives 3/4.
Also I need the Method Name:Mul

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900