something like this perhaps? local name = file:gsub('%.[a-z]*$', '') On Mon, 25 Jul 2022 at 13:33, 'Jan Ulrich Hasecke' via pandoc-discuss < pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> wrote: > Am 25.07.22 um 10:43 schrieb William Lupton: > > function Pandoc(pandoc) > > pandoc.meta.output_file = PANDOC_STATE.output_file > > return pandoc > > end > > Thanks a lot. > > I tried to strip the extension like this: > > function Pandoc(pandoc) > pandoc.meta.output_file = PANDOC_STATE.output_file:sub(0, - 5) > return pandoc > end > > But this only works with a three character extension. > > I guess it should be easy to strip everything after the colon with > regexp, if one is not a regexp illiterate like me. > > juh > > -- > You received this message because you are subscribed to the Google Groups > "pandoc-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit > https://groups.google.com/d/msgid/pandoc-discuss/e0252aa7-3e87-6381-a1a9-4f67acf7fbce%40mailbox.org > . > -- You received this message because you are subscribed to the Google Groups "pandoc-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CAEe_xxjdkVBoGTUXRPUgnGXEYAf0JZbAabEWjr%3DwNGq6joD4wg%40mail.gmail.com.