I am trying to parse URLs in a string of text. Currently my RegEx pattern looks like this:
(http(s)?://)?\S+\.(com|net|org|edu)\S*(?<!\W)
Sample text:
On that sample page (http://example.com/test/new.php), when you use the button, they are there, but when you use the inline, they are not.
Right now it keeps capturing the opening (
. I cant seem to get this right. Any tips? I am using .NET 4.0 and C# to try and parse this.
UPDATE: a sample text more reflective of the links it needs to capture
On that sample page (http://example.com/test/new.php), when you use the button, it redirects to sample.com/help instead of https://www.example.com or just example.com