Skip to content

Instantly share code, notes, and snippets.

View giacom0c's full-sized avatar
🏠
Working from home

giacom0c

🏠
Working from home
View GitHub Profile
@giacom0c
giacom0c / clean_sub.ps1
Created April 5, 2026 23:37
Powershell script to clean subtitles files (.srt)
# Change with your own path / fileName
$subsFolder = ".\Subs"
$fileName = "3_English.srt"
# I want to remove the J“ and j“ substrings
# “ is LEFT DOUBLE QUOTATION MARK (U+201C)
$upperMarker = ([char]0x004A).ToString() + ([char]0x201C).ToString()
$lowerMarker = ([char]0x006A).ToString() + ([char]0x201C).ToString()
# Recursive loop to get files in the subfolders