Dear list, I have the following sample:
\starttext \startluacode url = "../a/b/cb/ce.b/ca.b/c/dabc.pdf" context(url) context("\\\\0 ok. " .. url:match "^(.*).pdf$") -- name and path context("\\\\1. " .. url:match "^(.*).+$") -- path context("\\\\2. " .. url:match"[^/]+[.$]") -- name context("\\\\3 ok. " .. url:match "[^.]+$") -- extension \stopluacode \stoptext How can I get that match for #1 ends in the last slash (including it "../a/b/cb/ce.b/ca.b/c/") and match for #2 ends in the last period (excluding it, "dabc")? 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 ___________________________________________________________________________________