title: Python re.sub remove starting from specific index?
body: <p>I'm have a script that takes data and essentially cleans it by removing nominal-only elements. I'm wondering how I can adjust <code>remove='^[0-9.]+$'</code> to start at a specific index, let's say index 4? Right now it sweeps through each index.</p>
  <pre><code>
      def split_lines(fp, delimiter, remove='^[0-9.]+$'):
          with open(fp, mode=&quot;r&quot;, encoding=&quot;utf-8&quot;) as file:
              clean_list = []
              for line in file:
                  tokens = line.split(delimiter)
                  tokens = [re.sub(remove, &quot;&quot;, token) for token in tokens]
                  clean_list.append(list(filter(lambda e: e.strip(), tokens)))
              txt_edit.delete(&quot;1.0&quot;, tk.END)
              unique_data = {}
              for item in clean_list:
                  key = str(item)
                  if not unique_data.get(key):
                      unique_data[key] = 1, item
                  else:
                      unique_data[key] = (unique_data[key][0] + 1), item
              for k, v in unique_data.items():
                  txt_edit.insert(tk.END, f&quot;{v[1]}x {v[0]} \n&quot;)
  </code></pre>