SubLib Subtitle Library

Subtitles.ReplaceAll Method (Regex, String, String, Int32[], String[])

Replaces all occurences of some text with the specified replacement.

public int ReplaceAll(
   Regex regex,
   string replacement,
   string lineBreak,
   out int[] replacedSubtitles,
   out string[] oldTexts
);

Parameters

regex
A regular expression used to find the text to be replaced.
replacement
The text that will be used as a replacement.
lineBreak
The line break to use between multiple lines of text in each subtitle.
replacedSubtitles
The numbers of the subtitles that were replaced.
oldTexts
The texts of the subtitles that were replaced, before replacement was done.

Return Value

The number of replaced subtitles.

Remarks

The newline (\n) char is used as the line break.

See Also

Subtitles Class | SubLib Namespace | Subtitles.ReplaceAll Overload List