title: Looking for a variable and all characters behind the text
body: <p>I have a code that looks for a file and takes the last time saved (modified) and then compares it with a new time. If a difference was found it will pop up a notification.</p>
  <p>But Spreadsheet March.xlsx name can change to (example) Spreadsheet March 123.xlsx and I'm looking for something like in excel with adding * at the end so it will include everything behind the SpreadsheetPath variable.</p>
  <pre><code>import os.path, time
  from win10toast import ToastNotifier
  
  
  SpreadsheetPath = &quot;X\Spreadsheet March.xlsx&quot;
  Spreadsheet_OldTime = time.ctime(os.path.getmtime(SpreadsheetPath))
  
  def notif(file):
      toaster = ToastNotifier()
      toaster.show_toast(file, file + &quot; has been saved&quot;)
  
  while True:
      print(&quot;Comparing Spreadsheet Time - &quot; + Spreadsheet_OldTime[11:19] + &quot; and &quot; + time.ctime(os.path.getmtime(SpreadsheetPath))[11:19])
      if Spreadsheet_OldTime != time.ctime(os.path.getmtime(SpreadsheetPath)):
          notif(&quot;Spreadsheet&quot;)
          Spreadsheet_OldTime = time.ctime(os.path.getmtime(SpreadsheetPath))
          print(&quot;Notification Pushed&quot;)
      else:
          print(&quot;No difference found...&quot;)
          print(&quot;Sleeping for 10 seconds\n&quot;)
          time.sleep(10)
  </code></pre>
  <p>I've tried to google it, but unfortunately couldn't find a solution that would be simple and easy</p>