title: Python Regex to match a specific expression
body: <p>I have the following strings:</p>
  <ol>
  <li><code>project_identifier = &quot;CENTRAL PROPERTY DEVELOPMENTS JHB (PTY) LTD (1220681)&quot;</code></li>
  <li><code>plan_project_name = &quot;BLP416223852-CENTRAL PROPERTY DEVELOPMENTS JHB (PTY) LTD&quot;</code></li>
  <li><code>acnac_Id = &quot;BLP416223852&quot;</code></li>
  <li><code>project_sw_id = &quot;1232831&quot;</code>
  I am using the following regex to match plan_project_name string:
  <code>pattern = rf&quot;({acnac_Id}|{project_sw_id})(\s*-\s*)({project_name})&quot;</code> spaces around the hyphen are allowed.
  I obtain the project name by striping the project_identifier string from the right as follows:</li>
  </ol>
  <pre class="lang-py prettyprint-override"><code>project_name = str((projectname.rsplit(&quot;(&quot;,1)[0]).rstrip())
  </code></pre>
  <p>then</p>
  <pre class="lang-py prettyprint-override"><code>match = re.match(pattern,plan_project_name)
  </code></pre>
  <p>I am failing to find the match even when using <code>re.search</code> method, where am I getting it wrong?please help.</p>