Note that there are some explanatory texts on larger screens.

plurals
  1. POHow do I match everything except two characters?
    primarykey
    data
    text
    <p>I need to match all characters between double curly braces, but I need to be able to find multiple matches in one large string. </p> <p>I have been using this RegEx tester because I'm doing this in C#: <a href="http://derekslager.com/blog/posts/2007/09/a-better-dotnet-regular-expression-tester.ashx" rel="nofollow">http://derekslager.com/blog/posts/2007/09/a-better-dotnet-regular-expression-tester.ashx</a> Also, I have "SingleLine" checked because I want . to match \n</p> <p>Here is an example of the string I'm matching:</p> <pre><code>&lt;div class="nest-1-2"&gt; &lt;dl&gt; &lt;dt&gt;Type:&lt;/dt&gt; &lt;dd&gt;{{(Entity)Field Name.separator(, ) &gt; [:Name:]}}&lt;/dd&gt; &lt;dt&gt;At:&lt;/dt&gt; &lt;dd&gt;{{(Entity)Field Name &gt; [:Name:]}}&lt;/dd&gt; &lt;dt&gt;Team:&lt;/dt&gt; &lt;dd&gt;{{(Entity)Field Name.separator(, ) &gt; [:First Name:] [:Last Name:]}}&lt;/dd&gt; &lt;/dl&gt; &lt;/div&gt; </code></pre> <p>Here's the Regex that I'm using:</p> <pre><code>\{\{(?&lt;field&gt;[^&gt;]*)?[ &gt; ]?(?&lt;looptemplate&gt;[^\}\}].*)?\}\} </code></pre> <p>The problem I'm having is that I want everything in to match all text up to the next }} and this is matching the last one instead of the next one. So I'm getting 1 match which is everything from the first <code>{{</code> to the last <code>}}</code> I tried using negative look ahead <code>(?!\}\})</code> but that doesn't seem to work for me. Unfortunately, the <code>[^\}\}]</code> doesn't match both curly braces, it only matches one. </p> <p>I'm not a total noob with regular expressions, but this one has really gotten me. I've looked all around trying to find an answer, so now I'm hoping someone can help me.</p> <p>I'd really appreciate any help from the experts.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload