scriban / scriban

A fast, powerful, safe and lightweight scripting language and engine for .NET

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Finding templated sections in a large text content

alperenbelgic opened this issue · comments

I'd like to use scriban to template MS Word document content. I thought using the entire content of a Word document wouldn't be feasible. I am considering finding individual template variable and apply them parsing them individually.

So, what regex would be best to match template variables for scriban format?

Also, I'd love to know if you have any alternative and/or better suggestions for my use case.

( Templated word documents will be prepared by end users and I don't prefer using MS Office/Word specific structures.)

Many thanks to everyone making and contributing to such a great library.

#question

So, what regex would be best to match template variables for scriban format?
Also, I'd love to know if you have any alternative and/or better suggestions for my use case.

Not sure to follow entirely your use case, but Scriban creates a full AST when parsing a Scriban template, so you have access to all this information without regex.