in reply to Regex Query

perhaps Regexp::Common is what you are looking for:
use strict; use warnings; use Regexp::Common qw /URI/; my $http_and_https = qr{$RE{URI}{HTTP}{-scheme=>'https?'}}; while (my $line = <DATA>) { while ($line =~ m#($http_and_https)#gc) { print $1 , "\n"; } } __DATA__ a) black and white stuff http://test.com/testing" blah blah b) rain in spain blah blah https://chewu.to/x7w c) http://udsu.de/823; test this d) Just testing ... http://go.to/xi8jwe #goodtimes e) Super dooper. Looks nice! http://22.com/xx / http://p.de
Output:
http://test.com/testing https://chewu.to/x7w http://udsu.de/823; http://go.to/xi8jwe http://22.com/xx http://p.de

Replies are listed 'Best First'.
Re^2: Regex Query
by DanielSpaniel (Scribe) on Aug 27, 2013 at 00:22 UTC

    Hey, thanks very much for the suggestion.

    I'd not really planned on using a module to help with it, but it makes no difference if I do, so I'll give that a shot as soon as I get a chance and report back!

    Thank you again, I'm sure I can work with your suggestion.

        Thank you both, although I managed to do what I needed to do using the first suggestion.