Back to LanguageTool Homepage - Privacy - Imprint

Tip for Rule Developers to avoid copy and paste

I just found a neat trick to avoid duplicating code in XML:
Entities (as already defined at the top of most grammar.xml files) can also contain XML code, like this:

<!ENTITY date_numbers_pattern '
           <token regexp="yes">\d\d?</token>
            <token regexp="yes">\d\d?</token>
            <token regexp="yes">\d\d\d\d</token>

You would then use this later like this: