On 8/28/21 1:17 AM, Hans Hagen via ntg-context wrote:
> On 8/27/2021 8:53 PM, Pablo Rodriguez via ntg-context wrote:
>> [...]
>> 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")?
>
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
On 8/27/2021 8:53 PM, Pablo Rodriguez via ntg-context wrote:
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
Hi Pablo,
is the following what you need?
context("1. " .. url:match ".+/")
context("2a. " .. url:match "[^/]+/.+[.]") -- path and name with period
--context("2b. " .. url:match "[^/]+[^.]+$") -- name with period and
extension
context("2c. " .. (url:match "[^/]+[^.]+$") :match
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"[^/]+[.$]") --