Check for invalid subtitles

FAB Subtitler can be used to check whether subtitle files comply with certain criteria, for example that they do not contain subtitles with more than 2 or 3 lines of text, that timecode values are not overlapping in the subtitle file and more.

Manual search for invalid subtitles

  • Open the subtitle file in FAB Subtitler
  • Open the menu Extras in Ribbon and select “Check for invalid subtitles”
  • Select the correct criteria that you would like to check for

  • Click on “Find next” to jump to the next subtitle that match the selected search criteria
  • Click on “DISPLAY ALL” to display all subtitles that match the selected search criteria in a list

Using Regular Expressions

The RegExp tab in Check for invalid subtitles enables pattern-based searches across the subtitle file using Regular Expressions. It allows you to identify formatting inconsistencies, punctuation errors, or specific text structures across multi-line subtitles.

Key Features and Controls

  • Use regular expression to find subtitles: Enable this checkbox to activate regex filtering during the check process.

  • Line Break Handling (~): Subtitles in the editor represent line breaks using the tilde character (~). Write patterns expecting ~ as the line delimiter (e.g., (?m)^[^~]*[.?!]~(?![A-Z])).

  • Syntax Validation: The status display below the input field immediately verifies syntax correctness (e.g., ✓ Regular expression is valid).

  • Stored Regular Expressions: You can define a list of stored regular expressions that you will use frequently in Options / Editor / Invalid subtitles at the end of the page.

Generating Regular Expressions using AI

You can generate precise search patterns using an external AI chat assistant (such as ChatGPT, Claude, or Copilot).

To ensure the AI produces a compatible expression, specify that line breaks are represented by ~ and request a Delphi-compatible (TRegEx/PCRE) pattern without surrounding code.

Example AI Prompt:

  • “I have a text which contains a subtitle. The subtitle contains one or more lines of text separated by the character ~. Write a Delphi-compatible (TRegEx/PCRE extras) regular expression without any source code that matches when the subtitle line 1 ends with .?! and line 2 does not start with a capital letter.”

Automatic check of compliance

There are more possible ways how to check the compliance of multiple subtitle files. All methods are based on exporting the subtitle file in the ESUB-XF

Automatic check in batch mode

To convert multiple subtitle file to the ESUB-XF format please follow the instructions on the following page:

Batch conversion of multiple subtitle files

Automatic check in watchfolder mode

To convert multiple subtitle files automatically to the ESUB-XF format using a watchfolder please follow the instructions on the following page:

Conversion of subtitle files using watchfolders