Please ignore last messege.
So i tested on another file names, it fails. sadly. beyond my capacity to fix it. (i am also truncating filename at 75)
case1=
DESIRED RESULTbefore=
- Code: Select all
!!k$h!t @nd Ra~~```hul..........Propo$..-..ed___-____ H__-erWearing Cr!cket Jersey[])(][)(}}{{[][Wedding](M@nd@p) {Gulabjamun}[Flew Barat.mkv
after=
- Code: Select all
Iikshit And Rahul Proposed Her Wearing Cricket Jersey Wedding Mandap Gulabj.mkv
case2==>
UNWANTED RESULTbefore=
- Code: Select all
WiTh.the_Swords __ Under Gr@nd_$eMe$ter....Arr!ves__a an the of--_In_S!lence--..Two____Fu!!ll_Moon[]{}()~~~Of_Mount!ain_R!tuals .mkv
after=
- Code: Select all
Wi Ththe Swords Under Grandse Mester Arrivesa An The Of In Silence Two.mkv
Here’s the ideal truncated version (75 characters max) of case 2 filename:-
- Code: Select all
With The Swords Under Grand Semester Arrives A An The Of In Silence Two Full.mkv
((((problems in case2=The following issues occur with the current regex cleanup:
1. "WiTh.the" becomes "Wi Ththe" instead of "With The" — the period is removed without inserting a space.
2. "Gr@nd_$eMe$ter" becomes "Grandse Mester" but "$" is inconsistently replaced, sometimes duplicated or misplaced.
3. "Arr!ves__a" becomes "Arrivesa" instead of "Arrives A" — the words get merged due to multi-symbol deletion.
4. Multiple underscores like "__" and "____" remove separation between words, causing words to merge or collapse.
5. Double or triple spaces (e.g., after "Swords" or "Under") are preserved instead of being normalized to a single space.
)))
case 3=
getting unwanted resultbefore=
- Code: Select all
A.Stranger.by.the.Hill.{2024}.[1080p].10bit.IT.WEBRip.(Hindi).DD5.1.x265.HEVC-Ospreay.mp4
after=
- Code: Select all
AStrangerbythe Hill20241080p10bit ITWEBRip Hindi DD51x265HEVCOspreay.mp4
ideal output=
- Code: Select all
A Stranger By The Hill 2024 1080p 10bit IT Webrip Hindi DD5 1 x265 Hevc Ospreay.mp4
case 3 problems=1. Dots (.) between words like "A.Stranger.by.the.Hill" are removed without being converted to spaces, causing merged words.
2. Braces {}, brackets [], and parentheses () are stripped without spacing, leading to glued words like "Hill2024".
3. No space is added between year and resolution, causing "20241080p" instead of "2024 1080p".
4. Uppercase-lowercase transitions like "ITWEBRip" are not properly separated into "IT WEBRip".
5. No consistent spacing between elements like "Hindi", "DD5.1", "x265", etc., reducing readability.
currently using in bru=
search=
- Code: Select all
!/g(?X)@/g(?X)\$/g(?X)[][{}()~`._-]+/g(?X)([a-z])([A-Z])/g(?X)(^| )(.)/g(?X)^(.{75}).*
replace=
- Code: Select all
i(?X)a(?X)s(?X)(?X)$1 $2(?X)$1\u$2(?X)$1
bru version= 4.0.1.0