Paul Denning wrote:

Can someone provide a regexp for the last path component?


The following Perl-compatible regexp seems to do the trick:

        /^
          [^\#\?]*         # Stuff at front (ignore)
          \/([^\/]+)\/?    # Last path component
          (\?.*)?          # Query string (ignore)
          (\#.*)?          # Fragment (ignore)
        $/x

Use the first sub-pattern match as the tag.

--
Toby A Inkster
<mailto:[EMAIL PROTECTED]>
<http://tobyinkster.co.uk>



_______________________________________________
microformats-discuss mailing list
microformats-discuss@microformats.org
http://microformats.org/mailman/listinfo/microformats-discuss

Reply via email to