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

Clip to delete Bible books, chapters and verses

Expand Messages
  • muahelp
    Would you like to help me making the clip to delete the english Bible books, chapters and verses. Example: Matt.26:30; Mat_26:30 Mark.14:24; Mar_14:24
    Message 1 of 9 , Oct 15, 2007
    • 0 Attachment
      Would you like to help me making the clip to delete the english Bible
      books, chapters and verses.

      Example:

      Matt.26:30; Mat_26:30
      Mark.14:24; Mar_14:24
      Luuk.13:26; Luk_13:26
      Joh.13:4; Joh_13:4
      Ap.t.2:42; Act_2:42

      Result:

      Matt.26:30
      Mark.14:24
      Luuk.13:26
      Joh.13:4
      Ap.t.2:42
    • Axel Berger
      ... In each of your examples there is a semicolon and in each of them it s the only one there is. Can you rely on that for all possible cases or could there be
      Message 2 of 9 , Oct 15, 2007
      • 0 Attachment
        muahelp wrote:
        > Example:
        > Matt.26:30; Mat_26:30

        In each of your examples there is a semicolon and in each of them it's
        the only one there is. Can you rely on that for all possible cases or
        could there be exceptions, i.e. when more than one verse is cited in a
        line?

        Axel
      • Jane Sedgewick
        Do a simple search and replace Open search and replace - make sure the Regular Exp box is checked. Search for: ^([^;]+);(.*)$ Replace with: 1 Hope
        Message 3 of 9 , Oct 15, 2007
        • 0 Attachment
          Do a simple search and replace
          Open search and replace - make sure the Regular Exp box is checked.
          Search for: ^([^;]+);(.*)$
          Replace with: \1

          Hope this helps,
          Jane

          muahelp <muahelp@...> wrote:
          Would you like to help me making the clip to delete the english Bible
          books, chapters and verses.

          Example:

          Matt.26:30; Mat_26:30
          Mark.14:24; Mar_14:24
          Luuk.13:26; Luk_13:26
          Joh.13:4; Joh_13:4
          Ap.t.2:42; Act_2:42

          Result:

          Matt.26:30
          Mark.14:24
          Luuk.13:26
          Joh.13:4
          Ap.t.2:42






          ---------------------------------
          Fussy? Opinionated? Impossible to please? Perfect. Join Yahoo!'s user panel and lay it on us.

          [Non-text portions of this message have been removed]
        • muahelp
          ... I use this clip: ^!Replace Mat_{ d+ : d+ -* d*} WRSA This clip works but leave ; Help me?
          Message 4 of 9 , Oct 16, 2007
          • 0 Attachment
            --- In ntb-clips@yahoogroups.com, Axel Berger <Axel-Berger@...> wrote:
            >
            > muahelp wrote:
            > > Example:
            > > Matt.26:30; Mat_26:30
            >
            > In each of your examples there is a semicolon and in each of them it's
            > the only one there is. Can you rely on that for all possible cases or
            > could there be exceptions, i.e. when more than one verse is cited in a
            > line?
            >
            > Axel
            >
            I use this clip:

            ^!Replace Mat_{\d+\:\d+\-*\d*} >> WRSA

            This clip works but leave ;

            Help me?
          • Axel Berger
            ... I don t get it: a) This only deals with Matthew, your examples included many other books. b) If doing it that way, why look for Mat_ and not for ;
            Message 5 of 9 , Oct 16, 2007
            • 0 Attachment
              muahelp wrote:
              > I use this clip:
              > ^!Replace Mat_{\d+\:\d+\-*\d*} >> WRSA
              > This clip works but leave ;
              > Help me?

              I don't get it:
              a) This only deals with Matthew, your examples included many other
              books.
              b) If doing it that way, why look for "Mat_" and not for "; Mat_"?

              You've not answered my question so I can't really give good advice, but
              Jane's solution is just what I had in mind. One thing though: Hers works
              in version 4.xx.
              From NoteTab 5.0 upwards the replace string is no longer "\1" but "$1".

              I would have written Jane's version as:

              ^!Replace "^(.+?);(.+?)$" >> "$1" WRAS

              If there is exactly one and only one semicolon the results are the same.
              Jane's solution is more specific for finding the first semicolon.

              Axel
            • Don - HtmlFixIt.com
              ... Others have given a better solution. To get the ; out, you need to put it in your search string. It is either ; or ; I am not sure which without testing.
              Message 6 of 9 , Oct 16, 2007
              • 0 Attachment
                > I use this clip:
                >
                > ^!Replace {Mat_}{\d+\:\d+\-*\d*} >> WRSA
                >
                Others have given a better solution. To get the ; out, you need to put
                it in your search string.

                It is either ; or \; I am not sure which without testing.

                ^!Replace ;{Mat_}{\d+\:\d+\-*\d*} >> WRSA

                or

                ^!Replace \;{Mat_}{\d+\:\d+\-*\d*} >> WRSA

                But again that only does Mat_ and you have others. The regex solutions
                suggested are broader.
              • jane_sedgewick
                ... advice, but ... works ... but $1 . ... same. ... The reason I used ^([^;]+);(.*)$ instead of ^(.+?);(.+?)$ is that although the results are the same,
                Message 7 of 9 , Oct 16, 2007
                • 0 Attachment
                  --- In ntb-clips@yahoogroups.com, Axel Berger <Axel-Berger@...>
                  wrote:
                  >
                  > muahelp wrote:
                  > > I use this clip:
                  > > ^!Replace Mat_{\d+\:\d+\-*\d*} >> WRSA
                  > > This clip works but leave ;
                  > > Help me?
                  >
                  > I don't get it:
                  > a) This only deals with Matthew, your examples included many other
                  > books.
                  > b) If doing it that way, why look for "Mat_" and not for "; Mat_"?
                  >
                  > You've not answered my question so I can't really give good
                  advice, but
                  > Jane's solution is just what I had in mind. One thing though: Hers
                  works
                  > in version 4.xx.
                  > From NoteTab 5.0 upwards the replace string is no longer "\1"
                  but "$1".
                  >
                  > I would have written Jane's version as:
                  >
                  > ^!Replace "^(.+?);(.+?)$" >> "$1" WRAS
                  >
                  > If there is exactly one and only one semicolon the results are the
                  same.
                  > Jane's solution is more specific for finding the first semicolon.
                  >
                  > Axel

                  The reason I used ^([^;]+);(.*)$ instead of ^(.+?);(.+?)$ is that
                  although the results are the same, using a lazy match .+? needs to
                  backtrack after every letter to check a match and subsequently takes
                  64 steps to match any of these lines.
                  A negated class ([^;]) will do a match to the semicolon in one move
                  and the greedy (.*) after the semicolon moves directly to the end,
                  backtracks once to handle the end of line character. This takes only
                  8 steps to obtain a match.
                  This means in a big file the matches will be made much more
                  efficiently, and could impact the time to process.

                  Cordially,
                  Jane
                • Axel Berger
                  ... Jane, do you give lessons (an honest question, from that example you might well be a good teacher) and can I apply for one of your classes? I use the
                  Message 8 of 9 , Oct 16, 2007
                  • 0 Attachment
                    jane_sedgewick wrote:
                    > This takes only 8 steps to obtain a match.

                    Jane, do you give lessons (an honest question, from that example you
                    might well be a good teacher) and can I apply for one of your classes?

                    I use the non-greedy version as a matter of course for its reliability
                    and because I need not consider side effects as much as with the greedy
                    version. (And thiking about side effects tends to be about 90% of the
                    work in writing search and replace statements.) But I do appreciate
                    that's the sloppy thinking of a bloated Microsoft programmer and it
                    lacks any beauty.

                    But then an engineer's solution to anything tends to be ugly to look at
                    and and in defense I can say that refining a quick one-off hack for
                    files of normal length is seldom worth the effort in overall time.

                    Axel
                  • muahelp
                    ... Thanks. These clips works ok now.
                    Message 9 of 9 , Oct 17, 2007
                    • 0 Attachment
                      --- In ntb-clips@yahoogroups.com, "Don - HtmlFixIt.com" <don@...> wrote:
                      >
                      > > I use this clip:
                      > >
                      > > ^!Replace {Mat_}{\d+\:\d+\-*\d*} >> WRSA
                      > >
                      > Others have given a better solution. To get the ; out, you need to put
                      > it in your search string.
                      >
                      > It is either ; or \; I am not sure which without testing.
                      >
                      > ^!Replace ;{Mat_}{\d+\:\d+\-*\d*} >> WRSA
                      >
                      > or
                      >
                      > ^!Replace \;{Mat_}{\d+\:\d+\-*\d*} >> WRSA
                      >
                      > But again that only does Mat_ and you have others. The regex solutions
                      > suggested are broader.
                      >
                      Thanks. These clips works ok now.
                    Your message has been successfully submitted and would be delivered to recipients shortly.