![]() |
|
How to remove the Chinese lines from Bilingual subs? - Printable Version +- kanji koohii FORUM (http://forum.koohii.com) +-- Forum: Learning Japanese (http://forum.koohii.com/forum-4.html) +--- Forum: Off topic (http://forum.koohii.com/forum-13.html) +--- Thread: How to remove the Chinese lines from Bilingual subs? (/thread-13368.html) |
How to remove the Chinese lines from Bilingual subs? - eslang - 2015-11-17 Previously, Kuroro posted a similiar question in this forum under "Koohii Lounge" but that thread has disappeared due to the forum upgrade (I guess...) Quote:早かったわね\N{\fn方正中倩简体}{\fs50}真早呢 ReneSac suggested the following Regex search and replace using Sublime Text: Quote:\\N\{\\fn方正中倩简体\}\{\\fs50\}.*$ Is it possible to delete just the Chinese characters which always appear before \N{\fnMS Gothic}{\fs12}{\b0}{\c&HFFFFFF&}{\3c&H2F2F2F&}{\4c&H000000&} Quote:是 是\N{\fnMS Gothic}{\fs12}{\b0}{\c&HFFFFFF&}{\3c&H2F2F2F&}{\4c&H000000&}はいはい… I am not familiar with Regex string expression, and wonder if there is a way to delete only the Chinese part in the above situation? Thank you in advance for any help or advice. EDIT: ファブリス have decided to return the Off Topics threads from Koohii Lounge back here. This is Kuroro's thread http://forum.koohii.com/thread-13082.html RE: How to remove the Chinese lines from Bilingual subs? - aldebrn - 2015-11-17 Try: Find What: ^.*\\N Replace With: \\N This will replace your example text with: Quote:\N{\fnMS Gothic}{\fs12}{\b0}{\c&HFFFFFF&}{\3c&H2F2F2F&}{\4c&H000000&}はいはい… Is ok? RE: How to remove the Chinese lines from Bilingual subs? - Aspiring - 2015-11-17 You could download aegisub and manually delete the Chinese lines. RE: How to remove the Chinese lines from Bilingual subs? - eslang - 2015-11-17 (2015-11-17, 12:20 pm)aldebrn Wrote: Try: RE: How to remove the Chinese lines from Bilingual subs? - eslang - 2015-11-17 Thank you, aldebrn. Your suggestion works. Brilliant! RE: How to remove the Chinese lines from Bilingual subs? - eslang - 2015-11-22 After fiddling with the string expressions, it is possible to remove the Chinese lines in-between the bilingual subtitles by using Regex Match all characters between two strings syntax as follows: (?<=beginningstringname)(.*\n?)(?=endstringname) EXAMPLE: Dialogue: 0,0:00:18.18,0:00:19.19,con,NTP,0,0,0,,老师\N{\fn方正中倩简体}{\fs50}先生! Find What: (?<=con,NTP,0,0,0,,)(.*\n?)(?=\\N) Replace With: ![]() EDIT: added image file RE: How to remove the Chinese lines from Bilingual subs? - yogert909 - 2015-11-23 I'm not so savvy with look-behinds, but this should work: Replace: ^(.*?con,NTP,0,0,0,,)(.*?)(\\N.*$) Replace with: \1\3 see here for info on how back references work. RE: How to remove the Chinese lines from Bilingual subs? - aldebrn - 2015-11-24 Oi, where are you finding these bilingual Cn–Jp subs? They look fun ? RE: How to remove the Chinese lines from Bilingual subs? - eslang - 2015-11-24 (2015-11-24, 8:08 am)aldebrn Wrote: Oi, where are you finding these bilingual Cn–Jp subs? They look fun ?えっと、えっと、..... from the Chinese private websites. Just added an image link (above) to show how it looks like. What do you think? Kuroro got some of them from kitsunekko. http://forum.koohii.com/thread-13082.html Quote:I found the subtitles for さくら荘のペットな彼女 on Kitsunekko, but when I open them in Aegisub the two languages are not separated RE: How to remove the Chinese lines from Bilingual subs? - eslang - 2015-11-24 (2015-11-23, 6:43 pm)yogert909 Wrote: I'm not so savvy with look-behinds, but this should work:Thank you for your suggestion, but that syntax does not work. RE: How to remove the Chinese lines from Bilingual subs? - yogert909 - 2015-11-24 (2015-11-24, 9:28 am)eslang Wrote:(2015-11-23, 6:43 pm)yogert909 Wrote: I'm not so savvy with look-behinds, but this should work:Thank you for your suggestion, but that syntax does not work. Hmm, works for me in text wrangler. I think some regex uses $ for backreferences so maybe this will work for you: Replace: ^(.*?con,NTP,0,0,0,,)(.*?)(\\N.*$) Replace with: $1$3 RE: How to remove the Chinese lines from Bilingual subs? - aldebrn - 2015-11-24 (2015-11-22, 10:59 pm)eslang Wrote: After fiddling with the string expressions, it is possible to remove the Chinese lines in-between the bilingual subtitles by using Regex Match all characters between two strings syntax as follows:Are you just describing a solution you found, or are you asking a question about this regex? RE: How to remove the Chinese lines from Bilingual subs? - eslang - 2015-11-25 (2015-11-24, 1:59 pm)yogert909 Wrote: Hmm, works for me in text wrangler. I think some regex uses $ for backreferences so maybe this will work for you:やった! It works beautifully this time. サンキュー
RE: How to remove the Chinese lines from Bilingual subs? - eslang - 2015-11-25 (2015-11-24, 8:43 pm)aldebrn Wrote: Are you just describing a solution you found, or are you asking a question about this regex?Both - describing a solution and asking a question at the same time. Just curious to know, how many ways to achieve the same result. ![]() ¯\_(ツ)_/¯ |