<div dir="ltr"><div><div><div><div>Hello everybody,<br><br>I just noticed the Twitter ruleset example at <a href="https://www.eff.org/https-everywhere/rulesets">https://www.eff.org/https-everywhere/rulesets</a> is using a capturing group, <span style="background-color:rgb(238,238,238)"><span style="font-family:monospace,monospace">(www\.)</span></span>, but doesn't use result matched by the group.<br><br></div>It should be changed to a non-capturing group (which has better performance) so people writing a ruleset won't make the same mistake.<br></div><h1>Current ruleset</h1><pre><span style="background-color:rgb(238,238,238)"><ruleset name="Twitter">
  <target host="<a href="http://www.twitter.com">www.twitter.com</a>" />
  <target host="<a href="http://twitter.com">twitter.com</a>" />

  <rule from="^http://(www\.)?twitter\.com/" to="<a href="https://twitter.com/">https://twitter.com/</a>"/>
</ruleset><span style></span></span></pre></div><h1>Fixed</h1><pre><span style="background-color:rgb(238,238,238)"><ruleset name="Twitter">
  <target host="<a href="http://www.twitter.com">www.twitter.com</a>" />
  <target host="<a href="http://twitter.com">twitter.com</a>" />

  <rule from="^http://(<u><b>?:</b></u>www\.)?twitter\.com/" to="<a href="https://twitter.com/">https://twitter.com/</a>"/>
</ruleset></span></pre>(Non-capturing groups start with <span style="background-color:rgb(238,238,238)"><span style="font-family:monospace,monospace"><i>?:</i></span></span><span style="font-family:arial,helvetica,sans-serif">.</span>)<br><br></div><div>Regards,<br>Johan<br></div></div>