title: regex in $_POST variable
body: <p>I am working on an addon for wordpress - woocommerce. I am using the plugin "Woocommerce Product Addons" - with this addon i can insert for example a drop down select list for the property "color" which contains three colors - red, yellow, black.  This addon is on each product site now but the form name has on each product a different name. That is the reason why i don't know how to fetch the data with less code. </p>
  
  <p><strong>On one product site i have the select list with this name:</strong></p>
  
  <pre><code>&lt;select class="addon addon-select" name="addon-12822-variante-0"&gt;
  </code></pre>
  
  <p><strong>And on another product site i have the same addon but another name:</strong></p>
  
  <pre><code>&lt;select class="addon addon-select" name="addon-12834-variante-0"&gt;
  </code></pre>
  
  <p>You can see from this example, that the number inside the name changes on each site.</p>
  
  <p>I need one code which can work on all product sites, that's why i was thinking maybe i can insert regex somehow inside the <strong>$_POST['regex']</strong> but how does that work?</p>
  
  <p>I need this regex "<strong>((addon)-((\d)+)-)(farbe)-(0|1|2|3)</strong>".</p>
  
  <p>That in the end i have something like</p>
  
  <pre><code>$variant = $_POST['regexp'];
  </code></pre>
  
  <p>which works automatically on each product site.</p>
  
  <p>I hope there is any workaround and thanks in advance for every suggestion.</p>