ass_find_replace
Replace literal text or regex matches across selected subtitle lines, with case, field, and limit controls; preview edits via dry run before snapshot-backed changes.
Instructions
Find and replace text across the selected lines.
Args:
pattern: literal text (regex=False) or a Python regular expression
(regex=True, compiled with re.UNICODE; back-references like
\1 work in replacement).
replacement: replacement string (used literally when regex=False).
selection: selection spelling; None = every line.
doc_id: document to edit; the current one when omitted.
regex: treat pattern as a regular expression.
case_sensitive: False makes the match case-insensitive.
fields: which fields to touch; defaults to ["text"]. Any of
text, start, end, style, actor/name,
effect.
dry_run: count only, change nothing.
limit: stop after this many replacements in total.
Returns {"doc_id", "pattern", "replacement", "fields", "regex", "dry_run", "total": <replacements made>, "changed": [<0-based indices>], "lines": [{"index", "counts": {field: n}, "count", "text"}...], "limit"}. Snapshot-backed unless dry_run. Indices are 0-based.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| regex | No | ||
| doc_id | No | ||
| fields | No | ||
| dry_run | No | ||
| pattern | Yes | ||
| selection | No | ||
| replacement | Yes | ||
| case_sensitive | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||