Loading ...
Sorry, an error occurred while loading the content.

Creating a Find and Replace Script or Macro in ntp

Expand Messages
  • notetab-owner@yahoogroups.com
    Posting to the notetab list too as this doesn t require a script. Julie Date: Wed, 05 May 2010 20:58:06 +0000 From: mhcycles Subject:
    Message 1 of 4 , May 5, 2010
    • 0 Attachment
      Posting to the notetab list too as this doesn't require a script.

      Julie

      Date: Wed, 05 May 2010 20:58:06 +0000
      From: "mhcycles" <mhcycles@...>

      Subject: [NTS] Creating a Find and Replace Script or Macro in ntp
      To: ntb-scripts@yahoogroups.com

      I need to create an easy way to process a ntp file and replace every period with a period hard return and line space. Being a total novice at such things I'm hoping someone can tell me how to do it. The end result that I want is each sentence on a separate line with a line space in between the lines.

      Thanks.
    • Alex Plantema
      ... I think this should work: ^!Replace . + . r n r n WRSA This only replaces periods followed by one or more spaces. If it should replace all other
      Message 2 of 4 , May 5, 2010
      • 0 Attachment
        Op donderdag 6 mei 2010 00:13 schreef notetab-owner@yahoogroups.com:

        > I need to create an easy way to process a ntp file and replace every
        > period with a period hard return and line space. Being a total
        > novice at such things I'm hoping someone can tell me how to do it.
        > The end result that I want is each sentence on a separate line with a
        > line space in between the lines.

        I think this should work:

        ^!Replace "\. +" >> ".\r\n\r\n" WRSA

        This only replaces periods followed by one or more spaces.
        If it should replace all other periods too, replace the plus by an asterisk.

        Alex.
      • loro
        ... You can also do it without regex. In the Find box: . (that s a period followed by a space typed with the keyboard) In the Replace box: .^p^p The above
        Message 3 of 4 , May 5, 2010
        • 0 Attachment
          mhcycleso wrote:
          >I need to create an easy way to process a ntp file and replace every
          >period with a period hard return and line space. Being a total
          >novice at such things I'm hoping someone can tell me how to do
          >it. The end result that I want is each sentence on a separate line
          >with a line space in between the lines.

          You can also do it without regex.

          In the Find box: ". " (that's a period followed by a space typed with
          the keyboard)
          In the Replace box: ".^p^p"

          The above should be w/o the quotes and assumes your period are
          followed by a space. Hit F1 when you have the Replace dialogue open
          and you'll get the explanation for ^p and some other useful info.

          Lotta
        • helvetica_switzerland
          If you mean it needs to replace every single . in a notetab or other text file, copy the following line and save them as a clip under a name of your choice in
          Message 4 of 4 , May 8, 2010
          • 0 Attachment
            If you mean it needs to replace every single . in a notetab or other text file, copy the following line and save them as a clip under a name of your choice in the Pasteclips list (first rightclick anywhere in the pasteclips window, Add New Clip.. enter the name you want.. and then paste the following line ( the one between the **start** and **end** lines into the next window you see.

            **start**
            ^!Replace . .^p^p GA
            **end**

            Note that between the first dot and the second one, there is a TAB. There is another TAB between the second ^p and the GA. So check that there are indeed tabs there.
            To use it, open all the documents, then simply double-click the name of the clip in your right hand PasteClips window.
            All it means is: Command: Replace all . occurrences with . and newline + newline. GA is sort of "get all".
            If the ^p^p gives you a line too many, simply right click the clip..edit clip..delete the last ^p making sure that the tab is still ok, save and bob's your uncle.

            Hope this helps.




            --- In notetab@yahoogroups.com, notetab-owner@yahoogroups.com wrote:
            >
            > Posting to the notetab list too as this doesn't require a script.
            >
            > Julie
            >
            > Date: Wed, 05 May 2010 20:58:06 +0000
            > From: "mhcycles" <mhcycles@...>
            >
            > Subject: [NTS] Creating a Find and Replace Script or Macro in ntp
            > To: ntb-scripts@yahoogroups.com
            >
            > I need to create an easy way to process a ntp file and replace every period with a period hard return and line space. Being a total novice at such things I'm hoping someone can tell me how to do it. The end result that I want is each sentence on a separate line with a line space in between the lines.
            >
            > Thanks.
            >
          Your message has been successfully submitted and would be delivered to recipients shortly.