Orson Jones wrote: > Wade Preston Shearer wrote: >> I am trying to match both… >> >> http://example.com/a/b >> >> …and… >> >> http://example.com/a/b/ > > ^(.*)/(.*)/?$
Or if you want to also match http://example.com/a/b/whatever/else/is/out/here/ ^(.*)/(.*)/?.*$ Also, you might want to do ([^/]*) instead of (.*) ^([^/]*)/([^/]*) That one is probably more robust. You don't need an ending $ either unless you want to make sure nothing is after that. Orson _______________________________________________ UPHPU mailing list [email protected] http://uphpu.org/mailman/listinfo/uphpu IRC: #uphpu on irc.freenode.net
