Regex help

2003-02-18 Thread Andrew Staples
 I'm trying to match a string which would start with http://, 
 then a character string where there is one one or more 
 instances of "%", followed by one instance of ".com", i.e. 
 http://www.%55.com
 
 Here is my current pattern:
 http://.*%+.*(\.com)
 
 However, if there are two or more instances of ".com" in the 
 string, it matches on  the last ".com".  This is a test string that should
not match, but does:
 
http://www.test.com/%7Encbath/";>http://www.test.com/

In this case, I want the match to fail completely, because there is another
".com" in the string.

I've tried various combinations, and I obviously suck at regexes.  Help?

Andrew

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



Why is this wrong

2001-02-07 Thread Andrew Staples


Can someone tell me why I get a syntax error with this line of code?  I
guess I don't understand brackets that well.

last if $contents =~ /^[^\#]/ );

Andrew Staples
http://support.ltinet.net

I am sick unto death of obscure English towns that exist seemingly for the
sole
accommodation of these so-called limerick writers and even sicker of their
residents, all of whom suffer from physical deformities and spend their time
dismembering relatives at fancy dress balls. -- Editor of the Limerick Times
(Limerick, Ireland)

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users