I have the following URI
myapp://config/value?servers=https://192.168.251.1:8081&celldata=Y&https=Y&certificate=mylaptop.local:8080/certificate/clientcert.p12&certificatepassword=12345&allowgps=N
I wanted a nice efficient way of extracting the ports in the query string and thought I would try learning a bit of Regex in the process.
Using :(.*?)(,|&|/)
is almost the desired result, but I don't want the deliminitors in the result, just the text between.
Can some please explain what I can do to achieve this?
Note: Please add an explanation to any expressions, as I've seen plenty of similar question with answers that don't have explanations.
Edit:
Expected outcome here, would be a 8081
and 8080
as the expression for extracting the port. It will be written in C# but the programming language is irrelevant, as the expression is global.