title: How can I write this modsecurity rule?
body: <p>I'm trying to write a modsecurity rule that will match several bad User-Agent strings.
  User agent string looks like this: &quot;bad-agent name (+http://example.com/)&quot;</p>
  <p>But my rule don't seem to be working:</p>
  <pre><code>SecRule REQUEST_HEADERS:User-Agent &quot;@rx (?:yandex|daum|bad-agent name)&quot; \
  &quot;msg:'Spiderbot blocked - UA: %{REQUEST_HEADERS:USER-AGENT}',id:10008,log,t:lowercase,drop,phase:1&quot;
  </code></pre>
  <p>What am I doing wrong? I'm trying to match the string at the beginning of the user-agent string, as in &quot;starts with&quot;. I am very familiar with regex but modsecurity regex syntax is nowhere to come by.</p>
  <p>Thanks</p>