Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Negative expressions with alternation in ProxyRemoteMatch

by josera (Beadle)
on Aug 30, 2005 at 07:14 UTC ( #487661=note: print w/replies, xml ) Need Help??


in reply to Negative expressions with alternation in ProxyRemoteMatch

Hi
I don't know if this could help you, but here is it:
#!/usr/bin/perl -w use strict; my @string; my $i; $string[0]="http://www.server.com/image.jpg"; $string[1]="http://www.server.com/file.html"; $string[2]="http://www.serverjpg.com/image.jpg"; $string[3]="http://www.serverjpg.com/file.html"; for ($i=0; $i<4; $i++){ if ($string[$i]=~/(.jpg|.gif|.jpeg)$/){ print "Image\n"; } else { print "No image\n"; } }
The regular expresion is very simple so i hope that it could help you.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://487661]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (2)
As of 2022-08-16 00:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?