Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Finding templated sections in a large text content #538

Open
alperenbelgic opened this issue Feb 28, 2024 · 1 comment
Open

Finding templated sections in a large text content #538

alperenbelgic opened this issue Feb 28, 2024 · 1 comment
Labels

Comments

@alperenbelgic
Copy link

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

@xoofx
Copy link
Member

xoofx commented Mar 4, 2024

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.

@xoofx xoofx added the question label Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants