Rather than using regexes, you might consider simply using Julia’s parser, which gives you a syntax tree that you can walk to output anything you want. This will be a lot more robust than processing code as strings.
stevengj
3
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| Placing Unicode texts anywhere within Julia code | 3 | 223 | May 29, 2024 | |
| Code file generators examples | 1 | 324 | November 14, 2021 | |
| Parsing a Julia file | 4 | 1093 | November 1, 2022 | |
| Why does Meta.parse ignores comments? | 6 | 301 | January 31, 2024 | |
| How to use julia parser out of julia | 8 | 1056 | March 11, 2024 |