ANT attribute in regex pattern <p>I'm writing an utility macro wich involves checking whether a comma-separated list <code>list</code> contains or not a particular value <code>value</code>.</p> <pre><code>&lt;macrodef name="csvcontains"&gt; &lt;attribute name="value"/&gt; &lt;attribute name="list"/&gt; &lt;attribute name="casesensitive" default="false"/&gt; &lt;sequential&gt; &lt;condition property="matched" else="false"&gt; &lt;matches string="@{list}" pattern="TODO" casesensitive="@{casesensitive}"/&gt; &lt;/condition&gt; &lt;/sequential&gt; &lt;/macrodef&gt; </code></pre> <p>I cannot get the pattern right, because I'm not sure of how to escape <code>@{value}</code> (and to match a comma-separated pattern).</p> <p>How to build the pattern?</p> <p>Thanks</p>