title: How to parse OData parameters using regex?
body: <p>I know this is asked by many people but not solving my issue</p>
  
  <p>I have a odata query</p>
  
  <pre><code>/items?$filter=name eq 'CARPET T!@#&amp;$%^&amp;*()_+-=~&lt;&gt;?,./:";'[]\{}| APE&amp;1-13/32"X42'' or name eq 'Twitter' and subscribers gt '30'&amp;$top=1
  </code></pre>
  
  <p>I got it a solution but it adds next parameter in last value</p>
  
  <pre><code>(?&lt;Filter&gt;(?&lt;Resource&gt;.+?)\s(?
  &lt;Operator&gt;eq|ne|gt|ge|lt|le|add|sub|mul|div|mod|)\s'?(?&lt;Value&gt;.+?)'?)
  (?:\s*$|\s+(?:or|and|not))
  </code></pre>
  
  <p>In last :</p>
  
  <pre><code>**Resource -&gt; subscribers
  Operator -&gt; ge
  Value -&gt; '30' BUT it give '30'&amp;$top=1**
  </code></pre>