On 8/27/21 10:56 PM, Tomas Hala via ntg-context wrote: > Hi Pablo, > > is the following what you need? > > context("\\\\2a. " .. url:match "[^/]+/.+[.]") -- path and name with period > context("\\\\2c. " .. (url:match "[^/]+[^.]+$") :match ".+[.]") -- name with > period
Hi Tomáš, well, I wnanted to remove the ending period in both cases (and to understand how that patterns might work. I got the first one with: context("\\\\2a ok. " .. url:match "[^/]+.+/") -- path and name But I’m stuck at the second one (sorry, I don’t know how to remove the final period): context("\\\\2c. " .. url:match "[^/]+.$":match("^.+%l+[.$]")) https://pragma-ade.com/general/manuals/cld-mkiv.pdf#search=nameonly is the way to go, but it won’t hurt me to understand how patterns might work here. Many thanks for your help, Pablo -- http://www.ousia.tk ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___________________________________________________________________________________