Capture and backreference #336
-
Is it possible to build a grammar with xml tag name matching, ie <tag>...</tag> but not match <tag>...</other> |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Yes. In fact there's a very good explanation of the technique required and so-called "raw string" matching in the docs, and in the examples. .../contrib/raw_string.hpp is a good place to start. See the docs at .../doc/Contrib-and-Examples. The example there is a lua raw string, but once you understand what's happening there, it can be modified for xml. |
Beta Was this translation helpful? Give feedback.
-
I was able to use this along with a stack to track proper end tags, thanks! |
Beta Was this translation helpful? Give feedback.
Yes. In fact there's a very good explanation of the technique required and so-called "raw string" matching in the docs, and in the examples.
.../contrib/raw_string.hpp is a good place to start. See the docs at .../doc/Contrib-and-Examples. The example there is a lua raw string, but once you understand what's happening there, it can be modified for xml.