Reformatting extracted substrings using Match.Result in C# .NET
February 26, 2016 Leave a comment
Say you have the following Uri:
http://localhost:8080/webapps/bestapp
…and you’d like to extract the protocol and the port number and concatenate them. One option is a combination of a regular expression and matching groups within the regex: