in reply to Re: Capturing substrings with complex delimiter, up to a maximum
in thread Capturing substrings with complex delimiter, up to a maximum

But what if one of the URLs contains "http://"? For example...

http://translator.example.com/?url=http://www.example.fr/

Rather than an optional comma, an improvement would be to look for a comma or \A:

/(?:\A|,)(https?:\/\/)/
use Moops; class Cow :rw { has name => (default => 'Ermintrude') }; say Cow->new->name

Replies are listed 'Best First'.
Re^3: Capturing substrings with complex delimiter, up to a maximum
by hdb (Monsignor) on Oct 30, 2013 at 11:05 UTC

    That would be a problem. But can we rule out that a URL contains ",http://"?