jaysonking

Q: Text Edit Script Function, does it exist?

Thank you for taking the time to look into this.

 

At work I constantly have to go through textEdit using the find and replace to remove all items in between brackets. So Find [1] and replace it with nothing which I guess I am not replacing but removing.

 

I wondered if there was something to put in find that would find all instances of the brackets but also whats inside them? I was thinking with all the functions in Office to represent items maybe there is something that would find... [anything in these brackets].

 

I appreciate your time and help very much! 

Mac Pro, OS X Mavericks (10.9.4)

Posted on Jan 23, 2015 8:36 PM

Close

Q: Text Edit Script Function, does it exist?

  • All replies
  • Helpful answers

Previous Page 2
  • by t quinn,

    t quinn t quinn Jan 25, 2015 1:00 PM in response to Drew Reece
    Level 5 (5,041 points)
    Mac OS X
    Jan 25, 2015 1:00 PM in response to Drew Reece

    Okay Drew,

     

    Will muck about with this a while longer and then compose a new thread. Thanks,

     

    quinn

  • by rccharles,

    rccharles rccharles Jan 25, 2015 1:00 PM in response to jaysonking
    Level 6 (8,486 points)
    Classic Mac OS
    Jan 25, 2015 1:00 PM in response to jaysonking

    I'm using textwrangle with the find panel with regular expression since I checked grep.  I clicked on replace all.  You can use next to check out what is found. Here is an example of deleting the [ and everything inside ] by

     

    \[.*\]

     

    \[  I think [ is a special character so it is escaped via the \.  Since [ isn't a special character no more it is found in the text.

    .* is all characters until ending character

    \] ending character

     

    Regular expression are powerful but not for the faint of heart.  Search around the web, or ask here for the expression you need.

     

    I put nothing in the replacement string so the original string is deleted.

     

    finddoingbig.png

     

     

    finddoinggone.png

  • by t quinn,

    t quinn t quinn Jan 25, 2015 4:46 PM in response to Drew Reece
    Level 5 (5,041 points)
    Mac OS X
    Jan 25, 2015 4:46 PM in response to Drew Reece

    Hi Drew and all,

     

    I have started a new thread Using Applescript to replace negative indent in HTML

    so I no longer hijack this thread and can ask more focused questions on how to do what I want to do.

     

    quinn

  • by jaysonking,

    jaysonking jaysonking Jan 25, 2015 5:09 PM in response to Drew Reece
    Level 1 (0 points)
    Jan 25, 2015 5:09 PM in response to Drew Reece

    Thank you so much. The text edit mag glass thing works like a charm. I accidentally hit helpful so I tagged another of your post as solved my problem. I dont know if you get points or something but just wanted to make sure you got credit. You've saved me hours! I cannot thank you enough!

     

    Jayosn

  • by Drew Reece,

    Drew Reece Drew Reece Jan 25, 2015 5:39 PM in response to jaysonking
    Level 5 (7,527 points)
    Notebooks
    Jan 25, 2015 5:39 PM in response to jaysonking

    :^) Thank you.

     

    Yup, I got some shiny points from you but it's actually comments like yours that are more important, I'm glad to have helped.

  • by VikingOSX,

    VikingOSX VikingOSX Jan 25, 2015 5:39 PM in response to Drew Reece
    Level 7 (20,819 points)
    Mac OS X
    Jan 25, 2015 5:39 PM in response to Drew Reece

    Xcode ▸ Open Developer Tool ▸ Accessibility Inspector.

Previous Page 2