title: how to implement or after group in regex pattern
body: <p>I want to get the thread-id from my urls in one pattern. The pattern should hat just one group (on level 1). My test Strings are:</p>
  <pre><code>https://www.mypage.com/thread-3306-page-32.html
  https://www.mypage.com/thread-3306.html
  https://www.mypage.com/Thread-String-Thread-Id
  </code></pre>
  <p>So I want a Pattern, that gives me for line 1 and 2 the number 3306 and for the last line &quot;String-Thread-Id&quot;</p>
  <p>My current state is <code>.*[t|T]hread-(.*)[\-page.*|.html]</code>. But it fails at the end after the id. How to do it well? I also solved it like <code>.*Thread-(.*)|.*thread-(\\w+).*</code>, but this is with two groups not applicable for my java code.</p>