On Thu, 2004-04-29 at 12:37, Jakob Fix wrote: > Hi, > > I cannot find any examples for using regular expressions in a <map:match> > section of the sitemap. > > I want to match three types of URLs that are different only by one fragment, > i.e.: > > <map:match pattern="db/*/*/toc/*.xml"> > <map:match pattern="db/*/*/lot/*.xml"> > <map:match pattern="db/*/*/lof/*.xml"> > > There is a fourth URL type which is to be handled differently: > > <map:match pattern="db/*/*/doc/*.xml"> > > I thought I could reduce the three first pipelines into one by doing something > like this: > > <map:match type="regexp" pattern="db/*/*/[toc|lof|lot]/*.xml"> > > But I don't know how to reference the regex match in the generator.
You need to put ( ) around the parts you want to reference. What you wrote above isn't a regular expression though, try something like: <map:match type="regexp" pattern="db/(.*)/(.*)/(toc|lof|lot)/(.*).xml"> > A helping > hand or a link to examples of the usage of RegexpURIMatcher would be greatly > appreciated. > > Also, is the regex matcher very costly in comparison to the wildcard matcher? haven't ever tested it. -- Bruno Dumon http://outerthought.org/ Outerthought - Open Source, Java & XML Competence Support Center [EMAIL PROTECTED] [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
