On 2007/03/15, at 18:29, Jenda Krynicky wrote:
From: Igor Sutton Lopes <[EMAIL PROTECTED]>
my @possible_values = qw{
http://www.google.com
https://my.domain.
http://some.other.domain.net
};
my @urls = qw{
http://www.google.com/?some_bizarre_args
https://my.domain.com
https:
> I ended up going with this:
> if ($Scratch->{url} =~ /^https?:\/\/images\.google\./) {
> Does that look OK?
Variant of your code:
if ( $scratch->{url} =~ m#^https?://images\.google\.# ) {
But you'd better go with Randal's "use URI;" advice.
You're right, I hadn't grasped what URI was
Grant schreef:
> I ended up going with this:
> if ($Scratch->{url} =~ /^https?:\/\/images\.google\./) {
> Does that look OK?
Variant of your code:
if ( $scratch->{url} =~ m#^https?://images\.google\.# ) {
But you'd better go with Randal's "use URI;" advice.
--
Affijn, Ruud
"Gewoon is
> > regex.
> > if ( m/^https?\/\/:blah\.com/)
>
>
> my @possible_values = qw{
>http://www.google.com
>https://my.domain.
>http://some.other.domain.net
> };
>
> my @urls = qw{
>http://www.google.com/?some_bizarre_args
>https://my.domain.com
>https://my.domain.net
>http:
From: Igor Sutton Lopes <[EMAIL PROTECTED]>
> On 2007/03/14, at 16:00, yitzle wrote:
>
> > regex.
> > if ( m/^https?\/\/:blah\.com/)
>
>
> my @possible_values = qw{
>http://www.google.com
>https://my.domain.
>http://some.other.domain.net
> };
>
> my @urls = qw{
>http://www.googl
> "Grant" == Grant <[EMAIL PROTECTED]> writes:
Grant> Hello, I need to do some special processing if the domain of a URL
Grant> string matches a set of possible values. I'd like to catch http and
Grant> https. What is the best way to do that?
Keep in mind that www.stonehenge.com can be wri
My fault. The reason it does not match is the colon placement. It will
match http//:images.google.
Thanks, I really should have noticed that myself.
- Grant
> Can you correct my syntax? I can't get this to match:
>
> if ($Scratch->{url} =~ /^https?\/\/:images\.google\./) {
>
> The value of r
My fault. The reason it does not match is the colon placement. It will
match http//:images.google.
Can you correct my syntax? I can't get this to match:
if ($Scratch->{url} =~ /^https?\/\/:images\.google\./) {
The value of referrer is exactly:
http://images.google.
--
To unsubscribe, e-mai
On 2007/03/14, at 16:00, yitzle wrote:
regex.
if ( m/^https?\/\/:blah\.com/)
my @possible_values = qw{
http://www.google.com
https://my.domain.
http://some.other.domain.net
};
my @urls = qw{
http://www.google.com/?some_bizarre_args
https://my.domain.com
https://my.domain.net
h
regex.
if ( m/^https?\/\/:blah\.com/)
Can you correct my syntax? I can't get this to match:
if ($Scratch->{url} =~ /^https?\/\/:images\.google\./) {
The value of referrer is exactly:
http://images.google.
- Grant
> Hello, I need to do some special processing if the domain of a URL
> strin
On 2007/03/14, at 15:55, Jeff Pang wrote:
Hello,
I just think regex is the best way since you choose to use Perl
doing this work.
Regexp::Common::URI may be what you're looking for.
--
Igor Sutton
[EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands,
regex.
if ( m/^https?\/\/:blah\.com/)
Ok, how can I pass in the value I want evaluated? Sorry I'm such a beginner.
- Grant
> Hello, I need to do some special processing if the domain of a URL
> string matches a set of possible values. I'd like to catch http and
> https. What is the best wa
regex.
if ( m/^https?\/\/:blah\.com/)
On 3/14/07, Grant <[EMAIL PROTECTED]> wrote:
Hello, I need to do some special processing if the domain of a URL
string matches a set of possible values. I'd like to catch http and
https. What is the best way to do that?
- Grant
--
To unsubscribe, e-mai
>
>Hello, I need to do some special processing if the domain of a URL
>string matches a set of possible values. I'd like to catch http and
>https. What is the best way to do that?
>
Hello,
I just think regex is the best way since you choose to use Perl doing this work.
--
To unsubscribe, e-m
Hello, I need to do some special processing if the domain of a URL
string matches a set of possible values. I'd like to catch http and
https. What is the best way to do that?
- Grant
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.pe
15 matches
Mail list logo