Skip navigation
designgood_ds
Currently Being Moderated

Automatically delete a glyph from a paragraph if it's at the start or end of a line?

Apr 10, 2013 7:30 PM

Tags: #grep

How do I automatically delete a specific glyph from appearing in a paragraph (multiple times) if it is at the start or end of line?

 

i.e.

Turn this:

Name Surname • Name Surname • Name Surname • Name Surname • Name Surname

• Name Surname • Name Surname • Name Surname • Name Surname • Name Surname •

Name Surname • Name Surname • Name Surname • Name Surname • Name Surname

• Name Surname • Name Surname • Name Surname • Name Surname • Name Surname •

Name Surname • Name Surname • Name Surname • Name Surname • Name Surname •

 

Into this:

Name Surname • Name Surname • Name Surname • Name Surname • Name Surname

Name Surname • Name Surname • Name Surname • Name Surname • Name Surname

Name Surname • Name Surname • Name Surname • Name Surname • Name Surname

Name Surname • Name Surname • Name Surname • Name Surname • Name Surname

Name Surname • Name Surname • Name Surname • Name Surname • Name Surname

 
Replies
  • Currently Being Moderated
    Apr 12, 2013 8:01 AM   in reply to designgood_ds

    There is no way to delete the bullet at the end of a SENTENCE unless you define what is used to end a sentence, and that's pretty difficult to do. Period, question mark, exclamation point, close quotes, footnote marker? At least some of those can also appear NOT at the end of a sentence. It also looks to me like you don't really mean at the end of a sentence, but rather at the end of a LINE. Is there any sort of break -- forced line break, paragraph break -- at the ends of these lines? If there is it would be fairly simple to find a bullet followed by the break using GREP, but if not I think you would need a script that can count the number of characters on the line and then check the last or second to last (not quite sure if the trailing space, which you don't see but is almost certainly there if you change the column width, is handled) glyph to see if it's a bullet.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 12, 2013 11:46 AM   in reply to designgood_ds

    I'm positive it could be scripted - a script can assess text line-by-line. I can't think of any ways to do it without scripting, though.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points