Delete SRT subtitles markup

Discussion in 'Mac Programming' started by tcwdoggy, Jul 15, 2017.

Tags:
  1. tcwdoggy macrumors newbie

    Joined:
    Jun 13, 2012
    #1
    Hi,

    I want to write a simple apple script that can delete the italics markup "<i>" in SRT files. But the "<" and ">" are causing problem. What is the correct format to enter in this case?

    This is what I have.
    Thanks.

    tell application "TextEdit"
    set every word of front document where it is "<i>" to ""
    end tell
     
  2. cruisin macrumors 6502a

    cruisin

    Joined:
    Apr 1, 2014
    Location:
    Canada
    #2
    < and > have special meanings for computers, so you might have to "escape" it so that it is used as text, usually by using the "\" character.

    But why not use the find and replace option in the text editor of your choice?
     
  3. tcwdoggy thread starter macrumors newbie

    Joined:
    Jun 13, 2012
    #3
    Cause this is just the beginning of something more. I did tried your suggestion previously though, don't think it work at all.

    Thanks anyway.
     
  4. TheTruth101 macrumors regular

    Joined:
    Mar 15, 2017
    #4
    There is this software that runs on PC, is free and it does wonders. We use it for closed captioning. The best. It may work for you: http://www.nikse.dk/subtitleedit/
     

Share This Page