the '$' says that is the end of the line. If there is anything after, it returns false. Im not very experienced in regex. But, will this work?
^(.*)/(.*)(/)?$ Craig Jackson Web Developer -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Wade Preston Shearer Sent: Thursday, March 27, 2008 9:59 AM To: UPHPU Discuss Subject: [UPHPU] regex help I am trying to match both… http://example.com/a/b …and… http://example.com/a/b/ ^(.*)/(.*)$ …works for the first and… ^(.*)/(.*)/$ …works for the second, but I can't find a solution that matches both. Shouldn't the first match both because I am stopping after the "b" and not caring about thing else after that? _______________________________________________ UPHPU mailing list [email protected] http://uphpu.org/mailman/listinfo/uphpu IRC: #uphpu on irc.freenode.net
