in reply to Regex Query
Output: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
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 | |
by Anonymous Monk on Aug 27, 2013 at 01:07 UTC | |
by DanielSpaniel (Scribe) on Aug 27, 2013 at 16:39 UTC |