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