My optional tag group wont sync

Before the error happened, I was…
[Replace this text.]

Error message (don't change this)
Anki 2.1.65 (aa9a734f) Python 3.9.15 Qt 5.14.2 PyQt 5.14.1
Platform: macOS-14.1-x86_64-i386-64bit
Flags: frz=True ao=True sv=3
Add-ons, last update check: 2024-01-10 17:53:46

Traceback (most recent call last):

  File "aqt.taskman", line 122, in _on_closures_pending

  File "aqt.taskman", line 71, in <lambda>

  File "aqt.taskman", line 90, in wrapped_done

  File "/Users/arizkeshwani/Library/Application Support/Anki2/addons21/1322529746/gui/browser/browser.py", line 494, in on_done
    future.result()

  File "concurrent.futures._base", line 439, in result

  File "concurrent.futures._base", line 391, in __get_result

  File "concurrent.futures.thread", line 58, in run

  File "/Users/arizkeshwani/Library/Application Support/Anki2/addons21/1322529746/gui/browser/browser.py", line 502, in <lambda>
    task=lambda: _reset_optional_tag_group(extension_id=extension_id),

  File "/Users/arizkeshwani/Library/Application Support/Anki2/addons21/1322529746/gui/browser/browser.py", line 510, in _reset_optional_tag_group
    _remove_optional_tags_of_extension(extension_config)

  File "/Users/arizkeshwani/Library/Application Support/Anki2/addons21/1322529746/gui/browser/browser.py", line 529, in _remove_optional_tags_of_extension
    aqt.mw.col.tags.bulk_remove(note_ids=nids, tags=" ".join(tags_for_tag_group))

  File "anki.tags", line 67, in bulk_remove

  File "anki._backend_generated", line 1489, in remove_note_tags

  File "anki._backend", line 156, in _run_command

anki.errors.InvalidInput: <pre>Compiled regex exceeds size limit of 10485760 bytes.</pre>

Sentry link (for developers)

@jakub.f We can probably solve this by using col.tags.find_and_replace() with a regex instead of col.tags.bulk_remove().