Skip to content

Instantly share code, notes, and snippets.

@robertmryan
Created August 25, 2024 19:35
Show Gist options
  • Save robertmryan/bd789a414ea564c61e48e7f7f85a1024 to your computer and use it in GitHub Desktop.
Save robertmryan/bd789a414ea564c61e48e7f7f85a1024 to your computer and use it in GitHub Desktop.
func VTT2SRT() {
let targetPattern = /(?<timeStamp>\d\d:\d\d:\d\d)\./
var vtt = vttText.replacing(targetPattern) { $0.timeStamp + "," }
// …
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment