Perl Regex To Parse Links In Plain Text
I need the perl regex to parse plain text input and convert all links to valid HTML HREF links. I've tried 10 different versions I found on the web but none of them seen to work correctly. I also tested other solutions posted on StackOverflow, none of which seem to work. The correct solution should be able to find any URL in the plain text input and convert it to:

    <a href="$1">$1</a>

Some cases other regular expressions I tried didn't handle correctly include:

 1. URLs at the end of a line which are followed by returns
 2. URLs that included question marks
 3. URLs that start with 'https'

I'm hoping that another perl guy out there will already have a regular expression they are using for this that they can share. Thanks in advance for your help!
Perl Regex To Parse Links In Plain Text
===

I need the perl regex to parse plain text input and convert all links to valid HTML HREF links. I've tried 10 different versions I found on the web but none of them seen to work correctly. I also tested other solutions posted on StackOverflow, none of which seem to work. The correct solution should be able to find any URL in the plain text input and convert it to:

    <a href="$1">$1</a>

Some cases other regular expressions I tried didn't handle correctly include:

 1. URLs at the end of a line which are followed by returns
 2. URLs that included question marks
 3. URLs that start with 'https'

I'm hoping that another perl guy out there will already have a regular expression they are using for this that they can share. Thanks in advance for your help!