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

[Clip] Re: Tooltip clip?

Expand Messages
  • flo.gehrke
    ... Just a few comments on that pattern... 1. Named subpattern are used for referencing. Actually, there s only one reference to a single named subpattern
    Message 1 of 27 , Dec 20, 2012
    • 0 Attachment
      --- In ntb-clips@yahoogroups.com, "m.feichtinger" <mafei@...> wrote:
      >
      > The following clip works on your provided test text. (...)
      > The (?<Name>...) groups are named for convenient reference.
      > ^!Replace "(?xJ)^(?<HEAD>Matt\x20\d++:\d++\.?) (?<TEXT>.+)
      > \K ((?#BooklistStart) (?<SN>Mat)(?:t)? | (?<SN>Mar)(?:k)? |
      > (?<SN>Luu)(?:k)? | (?<SN>Joh)(?:)? | (?<SN>Esr)(?:a)? |
      > (?<SN>Mii)(?:ka)? | (?<SN>Ruu)(?:t)? (?#BooklistEnd)) \.? \x20"
      > >> "$<SN>_" RWAS
      > etc...

      Just a few comments on that pattern...

      1. Named subpattern are used for referencing. Actually, there's only one reference to a single named subpattern <SN>. There's no reference to <HEAD> and <TEXT>. So why introducing these names?

      2. Since you start with '^!Replace "(?xJ)^(?<HEAD>Matt\x20...', the only matches are achieved in lines (or paragraphs) that start with 'Matt'. So what's the use of that long alternation? Except 'Mat', none of these alternatives will ever be matched because - if I'm not mistaken - they don't occur in a line (or paragraph) that starts with 'Matt'.

      3. In general, it's not very efficient to name each item in an alternation with the same name. In this case, you probably are better off with a Duplicate Subpattern Number '(?|...)'.

      Example: Take an alternation reduced to 'Matt' or 'Mark' only. Instead of writing...

      ^!Replace "(?xJ)^Matt\x20\d+:\d+\.? .+ \K ((?<SN>Mat)(?:t)? | (?<SN>Mar)(?:k)? ) \.?\x20" >> "$<SN>_" WARS
      ^!IfError Next Else Skip_-1

      you better leave out that '(?J)' modifier, omit naming, and write...

      ^!Replace "(?x)^Matt\x20\d+:\d+\.? .+ \K (?|(Mat)(?:t)? | (Mar)(?:k)? ) \.?\x20" >> "$1_" RWAS
      ^!IfError Next Else Skip_-1

      This gets to the same result and saves you a lot of "noise" in your pattern.

      Please note: This is considering some details only -- it's not the complete job!

      In my view, it's impossible to seriously create a solution without a complete and exact overview of the data "before & after editing". Also a complete list is needed that shows all abbreviations for the books at start of string and how each one has to be replaced with a shorter notation. Though more than 20 messages have been posted so far, we haven't seen this indispensable precondition. Also, the conditions get changed with each of puusto's messages.

      Sorry -- I could imagine a more efficient procedure...

      Regards,
      Flo
    • m.feichtinger
      Hi, Replace the lines... ; Change format Xxx_15:7,38 (comma not surrounded by spaces!) to Xxx_15:7, Xxx_15:38 : ; --- LONG LINE START ^!Replace
      Message 2 of 27 , Dec 20, 2012
      • 0 Attachment
        Hi,

        Replace the lines...

        ; Change format "Xxx_15:7,38" (comma not surrounded by spaces!) to "Xxx_15:7, Xxx_15:38":
        ; --- LONG LINE START
        ^!Replace "(?x)^(?<TEXT>.+) ( (?<SN>\p{Lu}\p{Ll}{2}_)(?<CHAP>\d++:)\d++ ) , (?<VERS2>\d++)" >> "$<TEXT>$2, $<SN>$<CHAP>$<VERS2>" RWAS
        ; --- LONG LINE END

        ... with

        ; Change format "Xxx_15:7,38" or "#Xx_15:7,38" (comma not surrounded by spaces!) to "Xxx_15:7, Xxx_15:38" or "#Xx_15:7, #Xx_15:38":
        ; --- LONG LINE START
        ^!Replace "(?x)^(?<TEXT>.+) ( (?<SN>(\p{Lu}\p{Ll}{2}|\d\p{Lu}\p{Ll})_)(?<CHAP>\d++:)\d++ ) , (?<VERS2>\d++)" >> "$<TEXT>$2, $<SN>$<CHAP>$<VERS2>" RWAS
        ; --- LONG LINE END

        HTH

        --- In ntb-clips@yahoogroups.com, "puusto13" <puusto13@...> wrote:
        >
        > I found new problem if the ABR begins with number like these 1Ki, 2Ki and every others. The clip does print right only the first book, chap and verse. But let others done.
        >
        > Here is example result:
        > Matt 1:11. Babyloniaan. 2Ki_23:34; 1Ki_3:15,16; 2Jo_36:1,8, 2Ch_32:33, 33:25. 2Jo_21:3, 29:35,2Ki_15:7,38;
        > Matt 1:12. Sealtiel, Sealtielille Serubbaabel, 1Jo_3:17,19; Ezr_3:2.
        >
        > TL
        >
        > --- In ntb-clips@yahoogroups.com, "puusto13" <puusto13@> wrote:
        > >
        > > Hi,
        > >
        > > Thanks. I add the books names and use english ABR so it's easier.
        > >
        > > How to chance this that it can accept every 66 books:^!Replace "(?xJ)^(?<HEAD>Matt\x20\d++:\d++\.?) (?<TEXT>.+) \K
        > > I have replaced this (<HEAD>Matt) Matt to Mark.It works ok.
        > >
        > > My clip is now:
        > >
        > > ;===
        > > ; Replace 2nd and any other Matt. with Mat
        > > ;^!Replace "^Matt \d+:\d+.+Mat\Kt\. " >> "" RWAS
        > > ; Expand the following book list incl. short names to your liking.
        > > ; --- LONG LINE START
        > > ^!Replace "(?xJ)^(?<HEAD>Matt\x20\d++:\d++\.?) (?<TEXT>.+) \K ((?#BooklistStart)(?<SN>Gen)(?:)? | (?<SN>Exo)(?:)? | (?<SN>Lev)(?:)? | (?<SN>Num)(?:)? | (?<SN>Deu)(?:)? | (?<SN>Jos)(?:)? | (?<SN>Jdg)(?:)? | (?<SN>Rut)(?:)? | (?<SN>1Sa)(?:)? | (?<SN>2Sa)(?:)? | (?<SN>1Ki)(?:)? | (?<SN>2Ki)(?:)? | (?<SN>1Ch)(?:)? | (?<SN>2Ch)(?:)? | (?<SN>Ezr)(?:)? | (?<SN>Neh)(?:)? | (?<SN>Est)(?:)? | (?<SN>Job)(?:)? | (?<SN>Psa)(?:)? | (?<SN>Pro)(?:)? | (?<SN>Ecc)(?:)? | (?<SN>Son)(?:)? | (?<SN>Isa)(?:)? | (?<SN>Jer)(?:)? | (?<SN>Lam)(?:)? | (?<SN>Eze)(?:)? | (?<SN>Dan)(?:)? | (?<SN>Hos)(?:)? | (?<SN>Joe)(?:)? | (?<SN>Amo)(?:)? | (?<SN>Oba)(?:)? | (?<SN>Jon)(?:)? | (?<SN>Mic)(?:)? | (?<SN>Nah)(?:)? | (?<SN>Hab)(?:)? | (?<SN>Zep)(?:)? | (?<SN>Hag)(?:)? | (?<SN>Zec)(?:)? | (?<SN>Mal)(?:)? | (?<SN>Mat)(?:)? | (?<SN>Mar)(?:)? | (?<SN>Luk)(?:)? | (?<SN>Joh)(?:)? | (?<SN>Act)(?:)? | (?<SN>Rom)(?:)? | (?<SN>1Co)(?:)? | (?<SN>2Co)(?:)? | (?<SN>Gal)(?:)? | (?<SN>Eph)(?:)? | (?<SN>Phi)(?:)? | (?<SN>Col)(?:)? | (?<SN>1Th)(?:)? | (?<SN>2Th)(?:)? | (?<SN>1Ti)(?:)? | (?<SN>2Ti)(?:)? | (?<SN>Tit)(?:)? | (?<SN>Phm)(?:)? | (?<SN>Heb)(?:)? | (?<SN>Jam)(?:)? | (?<SN>1Pe)(?:)? | (?<SN>2Pe)(?:)? | (?<SN>1Jo)(?:)? | (?<SN>2Jo)(?:)? | (?<SN>3Jo)(?:)? | (?<SN>Jud)(?:)? | (?<SN>Rev)(?:)? (?#BooklistEnd)) \.?\x20" >> "$<SN>_" RWAS
        > > ; --- LONG LINE END
        > > ^!IfError Next Else Skip_-1
        > > ;^!Continue Continue?
        > >
        > > ; Add Mat_ to any number/colon series missing it.
        > > ;^!Replace "^.+(Mat_)(\d+:\d+)(.+)\K (?=\d+:\d+)" >> " $1" RWAS
        > > ; Add any short name (Xxx_ = uppercase letter, followed by 2 lowercase letters,followed by an underscore) to any number/colon series missing it.
        > > ; --- LONG LINE START
        > > ^!Replace "(?x)^(?<TEXT>.+) (?<SN>\p{Lu}\p{Ll}{2}_) (\d+:\d+) (.+) \K \x20(?=\d+:\d+)" >> " $<SN>" RWAS
        > > ; --- LONG LINE END
        > > ^!IfError Next Else Skip_-1
        > > ;^!Continue Continue?
        > > ;===
        > >
        > > ; Change format "Xxx_15:7,38" (comma not surrounded by spaces!) to "Xxx_15:7,Xxx_15:38":
        > > ; --- LONG LINE START
        > > ^!Replace "(?x)^(?<TEXT>.+) ( (?<SN>\p{Lu}\p{Ll}{2}_)(?<CHAP>\d++:)\d++ ) ,(?<VERS2>\d++)" >> "$<TEXT>$2, $<SN>$<CHAP>$<VERS2>" RWAS
        > > ; --- LONG LINE END
        > > ^!IfError Next Else Skip_-1
        > >
        > > TL
        > >
        > >
        > > --- In ntb-clips@yahoogroups.com, "m.feichtinger" <mafei@> wrote:
        > > >
        > > > Hi,
        > > >
        > > > I took John's suggestion and modified his code. The following clip works on your provided test text.
        > > > The (?#...) groups are comments for better readability, you can remove them.
        > > > The (?<Name>...) groups are named for convenient reference.
        > > > The RegEx containing the book list is taken from "Help > Help on Regular Expression > Named Subpatterns".
        > > >
        > > > HTH
        > > >
        > > > ;===
        > > > ; Replace 2nd and any other Matt. with Mat_
        > > > ;^!Replace "^Matt \d+:\d+.+Mat\Kt\. " >> "_" RWAS
        > > > ; Expand the following book list incl. short names to your liking.
        > > > ; --- LONG LINE START
        > > > ^!Replace "(?xJ)^(?<HEAD>Matt\x20\d++:\d++\.?) (?<TEXT>.+) \K ((?#BooklistStart) (?<SN>Mat)(?:t)? | (?<SN>Mar)(?:k)? | (?<SN>Luu)(?:k)? | (?<SN>Joh)(?:)? | (?<SN>Esr)(?:a)? | (?<SN>Mii)(?:ka)? | (?<SN>Ruu)(?:t)? (?#BooklistEnd)) \.? \x20" >> "$<SN>_" RWAS
        > > > ; --- LONG LINE END
        > > > ^!IfError Next Else Skip_-1
        > > > ;^!Continue Continue?
        > > >
        > > > ; Add Mat_ to any number/colon series missing it.
        > > > ;^!Replace "^.+(Mat_)(\d+:\d+)(.+)\K (?=\d+:\d+)" >> " $1" RWAS
        > > > ; Add any short name (Xxx_ = uppercase letter, followed by 2 lowercase letters, followed by an underscore) to any number/colon series missing it.
        > > > ; --- LONG LINE START
        > > > ^!Replace "(?x)^(?<TEXT>.+) (?<SN>\p{Lu}\p{Ll}{2}_) (\d+:\d+) (.+) \K \x20 (?=\d+:\d+)" >> " $<SN>" RWAS
        > > > ; --- LONG LINE END
        > > > ^!IfError Next Else Skip_-1
        > > > ;^!Continue Continue?
        > > > ;===
        > > >
        > > > ; Change format "Xxx_15:7,38" (comma not surrounded by spaces!) to "Xxx_15:7, Xxx_15:38":
        > > > ; --- LONG LINE START
        > > > ^!Replace "(?x)^(?<TEXT>.+) ( (?<SN>\p{Lu}\p{Ll}{2}_)(?<CHAP>\d++:)\d++ ) , (?<VERS2>\d++)" >> "$<TEXT>$2, $<SN>$<CHAP>$<VERS2>" RWAS
        > > > ; --- LONG LINE END
        > > > ^!IfError Next Else Skip_-1
        > > >
        > > >
        > > > --- In ntb-clips@yahoogroups.com, T L <puusto13@> wrote:
        > > > >
        > > > > It works with Matt rather good but there is some bugs like Matt 1:5. Salmonille Booas, jonka äiti oli Raahab. Booakselle syntyi
        > > > > Oobed, jonka äiti oli Ruut. Oobedille syntyi Iisai Mat_4:13,17...Here?
        > > > > Matt 4:15. Elihudille Eleasar, Eleasarille Mattan, Mattanille Jaakob.(Mat_15:7,38; Here?
        > > > >
        > > > > But how can I got it work with all the Bible books?
        > > > > (1. Moos.|2. Moos.|3. Moos.|4. Moos.|5. Moos.|Joos.|Tuom.|Ruut|1. Sam.|2. Sam.|1. Kun.|2. Kun.|1. Aik.|2. Aik.|Esra|Neh.|Est.|Job|Ps.|Sananl.|Saarn.|Laul. l.|Jes.|Jer.|Valit.|Hes.|Dan.|Hoos.|Joel|Aam.|Ob.|Joona|Miika|Nah.|Hab.|Sef.|Hagg.|Sak.|Mal.|Matt|Mark|Luuk|Joh.|Ap. t.|Room.|1. Kor.|2. Kor.|Gal.|Ef.|Fil.|Kol.|1. Tess.|2. Tess.|1. Tim.|2. Tim.|Tit.|Filem.|Hepr.|Jaak.|1. Piet.|2. Piet.|1. Joh.|2. Joh.|3. Joh.|Juud.|Ilm.)
        > > > >
        > > > > TL
        > > > >
        > > > >
        > > > >
        > > > > ________________________________
        > > > > From: John Shotsky <jshotsky@>
        > > > > To: ntb-clips@yahoogroups.com
        > > > > Sent: Wednesday, December 19, 2012 12:27 AM
        > > > > Subject: RE: [Clip] Re: Tooltip clip?
        > > > >
        > > > >
        > > > >  
        > > > > If I have understood the requirement this time, and if the first word is actually 'Matt' and not 'Mat', then the following will capture each of the Matt bits correctly.
        > > > > For other words, just repeat these 4 lines with the new words inserted where Matt or Mat is now. If any periods are in doubt, place a question mark after them.
        > > > > ;===
        > > > > ;Replace 2nd and any other Matt. with Mat_
        > > > > ^!Replace "^Matt \d+:\d+.+Mat\Kt\. " >> "_" ARSW
        > > > > ^!IfError Next Else Skip_-1
        > > > > ;Add Mat_ to any number/colon series missing it.
        > > > > ^!Replace "^.+(Mat_)(\d+:\d+)(.+)\K (?=\d+:\d+)" >> " $1" ARSW
        > > > > ^!IfError Next Else Skip_-1
        > > > > ;===
        > > > >
        > > > > Results with test text:
        > > > > Matt 1:1. Luku 1 JEESUKSEN SYNTYMÄ JA LAPSUUS Jeesuksen sukuluettelo (Mat_3:23-38). Jeesuksen Kristuksen, Daavidin pojan, Abrahamin pojan, sukuluettelo: Mat_132:11; Mat_1:3; Mat_3:16; Mat_22:16-17. (Mat_15:7,38, Mat_27:9, Mat_28:27
        > > > > Matt 1:2. Abrahamille syntyi Iisak, Iisakille Jaakob, Jaakobille Juuda ja tämän veljet. Mat_21:3, Mat_29:35
        > > > > Matt 1:3. Juudalle syntyivät Peres ja Serah, joiden äiti oli Taamar. Perekselle syntyi Hesron, Hesronille Raam, Mat_38:27-30; Mat_4:18-22; Mat_2:4-15
        > > > > Matt 1:4. Raamille Amminadab, Amminadabille Nahson, Nahsonille Salmon,
        > > > > Matt 1:5. Salmonille Booas, jonka äiti oli Raahab. Booakselle syntyi Oobed, jonka äiti oli Ruut. Oobedille syntyi Iisai Mat_4:13,17
        > > > > Matt 1:6. ja Iisaille Daavid, kuningas. Daavidille syntyi Salomo, jonka äiti oli Uurian vaimo. Mat_12:10,24
        > > > > Matt 1:7. Salomolle syntyi Rehabeam, Rehabeamille Abia, Abialle Aasa, Mat_11:43, Mat_14:31, Mat_15:8
        > > > > Matt 1:8. Aasalle Joosafat, Joosafatille Jooram, Jooramille Ussia, Mat_15:24; Mat_8:16; Mat_26:1.
        > > > > Matt 1:9. Ussialle Jootam, Jootamille Aahas, Aahakselle Hiskia, Mat_15:7,38; Mat_27:9, Mat_28:27
        > > > > Matt 1:10. Hiskialle Manasse, Manasselle Aamon, Aamonille Joosia Mat_20:21, Mat_21:18; Mat_32:33, Mat_33:25: Salmonille Booas, jonka äiti oli Raahab. Booakselle syntyi Oobed, Mat_23:34, Mat_3:15,16; Mat_36:1,8;
        > > > > Matt 1:11. ja Joosialle Jekonja ja tämän veljet siihen aikaan, kun kansaa siirrettiin Babyloniaan. Mat_23:34, Mat_3:15,16; Mat_36:1,8; Salomolle syntyi Rehabeam, Rehabeamille Abia, Abialle Aasa, Mat_11:43, Mat_14:31, Mat_15:8
        > > > > Matt 1:12. Babyloniaan siirtämisen jälkeen Jekonjalle syntyi Sealtiel, Sealtielille Serubbaabel, Mat_3:17,19; Mat_3:2
        > > > > Matt 2:13. Serubbaabelille Abihud, Abihudille Eljakim, Eljakimille Assur, (Mat_15:7,38, Mat_27:9, Mat_28:27).
        > > > > Matt 3:14. Assurille Saadok, Saadokille Jaakin, Jaakinille Elihud, (Mat_15:7,38; Mat_27:9; Mat_28:27)
        > > > > Matt 4:15. Elihudille Eleasar, Eleasarille Mattan, Mattanille Jaakob.(Mat_15:7,38; Mat_27:9, Mat_28:27),
        > > > > Matt 5:16. ja Jaakobille Joosef, Marian mies. Mariasta syntyi Jeesus, jota kutsutaan Kristukseksi1.
        > > > > Matt 6:17. Abrahamista Daavidiin on siten kaikkiaan neljätoista sukupolvea, Daavidista Babylonian pakkosiirtolaisuuteen asti neljätoista ja Babylonian pakkosiirtolaisuudesta Kristukseen neljätoista sukupolvea. Jeesuksen syntymä (Mat_2:1-7).
        > > > >
        > > > > Regards,
        > > > > John
        > > > > RecipeTools Web Site: <http://recipetools.gotdns.com/> http://recipetools.gotdns.com/
        > > > >
      • puusto13
        Hi, Example text what is now used. My text is originally this kind of. Mat 1:6. ja Iisaille Daavid, kuningas. Daavidille syntyi Salomo, jonka äiti oli Uurian
        Message 3 of 27 , Dec 21, 2012
        • 0 Attachment
          Hi,

          Example text what is now used. My text is originally this kind of.
          Mat 1:6. ja Iisaille Daavid, kuningas. Daavidille syntyi Salomo, jonka äiti oli Uurian vaimo. 2Sa. 12:10,24
          Mat 1:7. Salomolle syntyi Rehabeam, Rehabeamille Abia, Abialle Aasa, 1Ki. 11:43, 14:31, 15:8
          Mat 1:8. Aasalle Joosafat, Joosafatille Jooram, Jooramille Ussia, 1Ki. 15:24; 2Ki. 8:16; 2Ch. 26:1
          Mat 1:9. Ussialle Jootam, Jootamille Aahas, Aahakselle Hiskia, 2Ki. 15:7,38; 2Ch. 27:9, 28:27
          Mat 1:10. Hiskialle Manasse, Manasselle Aamon, Aamonille Joosia 2Ki. 20:21, 21:18; 2Ch. 32:33, 33:25
          Mat 1:11. ja Joosialle Jekonja ja tämän veljet siihen aikaan, kun kansaa siirrettiin Babyloniaan. 2Ki. 23:34; 1Ch. 3:15,16; 2Ch. 36:1,8

          ----------------------
          After this clip:
          Mat 1:6. ja Iisaille Daavid, kuningas. Daavidille syntyi Salomo, jonka äiti oli Uurian vaimo. 2Sa_12:10, 2Sa_12:24
          Mat 1:7. Salomolle syntyi Rehabeam, Rehabeamille Abia, Abialle Aasa, 1Ki_11:43, 14:31, 15:8
          Mat 1:8. Aasalle Joosafat, Joosafatille Jooram, Jooramille Ussia, 1Ki_15:24; 2Ki_8:16; 2Ch_26:1
          Mat 1:9. Ussialle Jootam, Jootamille Aahas, Aahakselle Hiskia, 2Ki_15:7, 2Ki_15:38; 2Ch_27:9, 28:27
          Mat 1:10. Hiskialle Manasse, Manasselle Aamon, Aamonille Joosia 2Ki_20:21, 21:18; 2Ch_32:33, 33:25
          Mat 1:11. ja Joosialle Jekonja ja tämän veljet siihen aikaan, kun kansaa siirrettiin Babyloniaan. 2Ki_23:34; 1Ch_3:15, 1Ch_3:16; 2Ch_36:1, 2Ch_36:8

          ------------------------
          I have replaced Abr first number like this 1Ki=Fki, 2Ki=Xki and then replaced back Fki=1Ki, Xki=2Ki etc.....
          Mat 1:6. ja Iisaille Daavid, kuningas. Daavidille syntyi Salomo, jonka äiti oli Uurian vaimo. 2Sa_12:10, 2Sa_12:24
          Mat 1:7. Salomolle syntyi Rehabeam, Rehabeamille Abia, Abialle Aasa, 1Ki_11:43, 1Ki_14:31, 1Ki_15:8. 1Ki_11:43; 1Ki_14:31; 1Ki_15:8.
          Mat 1:8. Aasalle Joosafat, Joosafatille Jooram, Jooramille Ussia, 1Ki_15:24; 2ki_8:16; 2Ch_26:1
          Mat 1:9. Ussialle Jootam, Jootamille Aahas, Aahakselle Hiskia, 2ki_15:7, 2ki_15:38; 2Ch_27:9, 2Ch_28:27
          Mat 1:10. Hiskialle Manasse, Manasselle Aamon, Aamonille Joosia 2ki_20:21, 2ki_21:18; 2Ch_32:33, 2Ch_33:25
          Mat 1:11. ja Joosialle Jekonja ja tämän veljet siihen aikaan, kun kansaa siirrettiin Babyloniaan. 2ki_23:34; 1Ch_3:15, 1Ch_3:16; 2Ch_36:1, 2Ch_36:8

          Is here something what must yet change? If Xxx=1Ki but if it's Fxx result is ok?
          ; Change format "Xxx_15:7,38" or "#Xx_15:7,38" (comma not surrounded by spaces!)to "Xxx_15:7, Xxx_15:38" or "#Xx_15:7, #Xx_15:38":
          ; --- LONG LINE START
          ^!Replace "(?x)^(?<TEXT>.+) ((?<SN>(\p{Lu}\p{Ll}{2}|\d\p{Lu}\p{Ll})_)(?<CHAP>\d++:)\d++ ) , (?<VERS2>\d++)">> "$<TEXT>$2, $<SN>$<CHAP>$<VERS2>" RWAS
          ; --- LONG LINE END

          This clip is almost correct.

          Thank you! To everyone, as well as others who have helped me

          TL

          --- In ntb-clips@yahoogroups.com, "m.feichtinger" <mafei@...> wrote:
          >
          > Hi,
          >
          > Replace the lines...
          >
          > ; Change format "Xxx_15:7,38" (comma not surrounded by spaces!) to "Xxx_15:7, Xxx_15:38":
          > ; --- LONG LINE START
          > ^!Replace "(?x)^(?<TEXT>.+) ( (?<SN>\p{Lu}\p{Ll}{2}_)(?<CHAP>\d++:)\d++ ) , (?<VERS2>\d++)" >> "$<TEXT>$2, $<SN>$<CHAP>$<VERS2>" RWAS
          > ; --- LONG LINE END
          >
          > ... with
          >
          > ; Change format "Xxx_15:7,38" or "#Xx_15:7,38" (comma not surrounded by spaces!) to "Xxx_15:7, Xxx_15:38" or "#Xx_15:7, #Xx_15:38":
          > ; --- LONG LINE START
          > ^!Replace "(?x)^(?<TEXT>.+) ( (?<SN>(\p{Lu}\p{Ll}{2}|\d\p{Lu}\p{Ll})_)(?<CHAP>\d++:)\d++ ) , (?<VERS2>\d++)" >> "$<TEXT>$2, $<SN>$<CHAP>$<VERS2>" RWAS
          > ; --- LONG LINE END
          >
          > HTH
          >
          > --- In ntb-clips@yahoogroups.com, "puusto13" <puusto13@> wrote:
          > >
          > > I found new problem if the ABR begins with number like these 1Ki, 2Ki and every others. The clip does print right only the first book, chap and verse. But let others done.
          > >
          > > Here is example result:
          > > Matt 1:11. Babyloniaan. 2Ki_23:34; 1Ki_3:15,16; 2Jo_36:1,8, 2Ch_32:33, 33:25. 2Jo_21:3, 29:35,2Ki_15:7,38;
          > > Matt 1:12. Sealtiel, Sealtielille Serubbaabel, 1Jo_3:17,19; Ezr_3:2.
          > >
          > > TL
          > >
          > > --- In ntb-clips@yahoogroups.com, "puusto13" <puusto13@> wrote:
          > > >
          > > > Hi,
          > > >
          > > > Thanks. I add the books names and use english ABR so it's easier.
          > > >
          > > > How to chance this that it can accept every 66 books:^!Replace "(?xJ)^(?<HEAD>Matt\x20\d++:\d++\.?) (?<TEXT>.+) \K
          > > > I have replaced this (<HEAD>Matt) Matt to Mark.It works ok.
          > > >
          > > > My clip is now:
          > > >
          > > > ;===
          > > > ; Replace 2nd and any other Matt. with Mat
          > > > ;^!Replace "^Matt \d+:\d+.+Mat\Kt\. " >> "" RWAS
          > > > ; Expand the following book list incl. short names to your liking.
          > > > ; --- LONG LINE START
          > > > ^!Replace "(?xJ)^(?<HEAD>Matt\x20\d++:\d++\.?) (?<TEXT>.+) \K ((?#BooklistStart)(?<SN>Gen)(?:)? | (?<SN>Exo)(?:)? | (?<SN>Lev)(?:)? | (?<SN>Num)(?:)? | (?<SN>Deu)(?:)? | (?<SN>Jos)(?:)? | (?<SN>Jdg)(?:)? | (?<SN>Rut)(?:)? | (?<SN>1Sa)(?:)? | (?<SN>2Sa)(?:)? | (?<SN>1Ki)(?:)? | (?<SN>2Ki)(?:)? | (?<SN>1Ch)(?:)? | (?<SN>2Ch)(?:)? | (?<SN>Ezr)(?:)? | (?<SN>Neh)(?:)? | (?<SN>Est)(?:)? | (?<SN>Job)(?:)? | (?<SN>Psa)(?:)? | (?<SN>Pro)(?:)? | (?<SN>Ecc)(?:)? | (?<SN>Son)(?:)? | (?<SN>Isa)(?:)? | (?<SN>Jer)(?:)? | (?<SN>Lam)(?:)? | (?<SN>Eze)(?:)? | (?<SN>Dan)(?:)? | (?<SN>Hos)(?:)? | (?<SN>Joe)(?:)? | (?<SN>Amo)(?:)? | (?<SN>Oba)(?:)? | (?<SN>Jon)(?:)? | (?<SN>Mic)(?:)? | (?<SN>Nah)(?:)? | (?<SN>Hab)(?:)? | (?<SN>Zep)(?:)? | (?<SN>Hag)(?:)? | (?<SN>Zec)(?:)? | (?<SN>Mal)(?:)? | (?<SN>Mat)(?:)? | (?<SN>Mar)(?:)? | (?<SN>Luk)(?:)? | (?<SN>Joh)(?:)? | (?<SN>Act)(?:)? | (?<SN>Rom)(?:)? | (?<SN>1Co)(?:)? | (?<SN>2Co)(?:)? | (?<SN>Gal)(?:)? | (?<SN>Eph)(?:)? | (?<SN>Phi)(?:)? | (?<SN>Col)(?:)? | (?<SN>1Th)(?:)? | (?<SN>2Th)(?:)? | (?<SN>1Ti)(?:)? | (?<SN>2Ti)(?:)? | (?<SN>Tit)(?:)? | (?<SN>Phm)(?:)? | (?<SN>Heb)(?:)? | (?<SN>Jam)(?:)? | (?<SN>1Pe)(?:)? | (?<SN>2Pe)(?:)? | (?<SN>1Jo)(?:)? | (?<SN>2Jo)(?:)? | (?<SN>3Jo)(?:)? | (?<SN>Jud)(?:)? | (?<SN>Rev)(?:)? (?#BooklistEnd)) \.?\x20" >> "$<SN>_" RWAS
          > > > ; --- LONG LINE END
          > > > ^!IfError Next Else Skip_-1
          > > > ;^!Continue Continue?
          > > >
          > > > ; Add Mat_ to any number/colon series missing it.
          > > > ;^!Replace "^.+(Mat_)(\d+:\d+)(.+)\K (?=\d+:\d+)" >> " $1" RWAS
          > > > ; Add any short name (Xxx_ = uppercase letter, followed by 2 lowercase letters,followed by an underscore) to any number/colon series missing it.
          > > > ; --- LONG LINE START
          > > > ^!Replace "(?x)^(?<TEXT>.+) (?<SN>\p{Lu}\p{Ll}{2}_) (\d+:\d+) (.+) \K \x20(?=\d+:\d+)" >> " $<SN>" RWAS
          > > > ; --- LONG LINE END
          > > > ^!IfError Next Else Skip_-1
          > > > ;^!Continue Continue?
          > > > ;===
          > > >
          > > > ; Change format "Xxx_15:7,38" (comma not surrounded by spaces!) to "Xxx_15:7,Xxx_15:38":
          > > > ; --- LONG LINE START
          > > > ^!Replace "(?x)^(?<TEXT>.+) ( (?<SN>\p{Lu}\p{Ll}{2}_)(?<CHAP>\d++:)\d++ ) ,(?<VERS2>\d++)" >> "$<TEXT>$2, $<SN>$<CHAP>$<VERS2>" RWAS
          > > > ; --- LONG LINE END
          > > > ^!IfError Next Else Skip_-1
          > > >
          > > > TL
          > > >
          > > >
          > > > --- In ntb-clips@yahoogroups.com, "m.feichtinger" <mafei@> wrote:
          > > > >
          > > > > Hi,
          > > > >
          > > > > I took John's suggestion and modified his code. The following clip works on your provided test text.
          > > > > The (?#...) groups are comments for better readability, you can remove them.
          > > > > The (?<Name>...) groups are named for convenient reference.
          > > > > The RegEx containing the book list is taken from "Help > Help on Regular Expression > Named Subpatterns".
          > > > >
          > > > > HTH
          > > > >
          > > > > ;===
          > > > > ; Replace 2nd and any other Matt. with Mat_
          > > > > ;^!Replace "^Matt \d+:\d+.+Mat\Kt\. " >> "_" RWAS
          > > > > ; Expand the following book list incl. short names to your liking.
          > > > > ; --- LONG LINE START
          > > > > ^!Replace "(?xJ)^(?<HEAD>Matt\x20\d++:\d++\.?) (?<TEXT>.+) \K ((?#BooklistStart) (?<SN>Mat)(?:t)? | (?<SN>Mar)(?:k)? | (?<SN>Luu)(?:k)? | (?<SN>Joh)(?:)? | (?<SN>Esr)(?:a)? | (?<SN>Mii)(?:ka)? | (?<SN>Ruu)(?:t)? (?#BooklistEnd)) \.? \x20" >> "$<SN>_" RWAS
          > > > > ; --- LONG LINE END
          > > > > ^!IfError Next Else Skip_-1
          > > > > ;^!Continue Continue?
          > > > >
          > > > > ; Add Mat_ to any number/colon series missing it.
          > > > > ;^!Replace "^.+(Mat_)(\d+:\d+)(.+)\K (?=\d+:\d+)" >> " $1" RWAS
          > > > > ; Add any short name (Xxx_ = uppercase letter, followed by 2 lowercase letters, followed by an underscore) to any number/colon series missing it.
          > > > > ; --- LONG LINE START
          > > > > ^!Replace "(?x)^(?<TEXT>.+) (?<SN>\p{Lu}\p{Ll}{2}_) (\d+:\d+) (.+) \K \x20 (?=\d+:\d+)" >> " $<SN>" RWAS
          > > > > ; --- LONG LINE END
          > > > > ^!IfError Next Else Skip_-1
          > > > > ;^!Continue Continue?
          > > > > ;===
          > > > >
          > > > > ; Change format "Xxx_15:7,38" (comma not surrounded by spaces!) to "Xxx_15:7, Xxx_15:38":
          > > > > ; --- LONG LINE START
          > > > > ^!Replace "(?x)^(?<TEXT>.+) ( (?<SN>\p{Lu}\p{Ll}{2}_)(?<CHAP>\d++:)\d++ ) , (?<VERS2>\d++)" >> "$<TEXT>$2, $<SN>$<CHAP>$<VERS2>" RWAS
          > > > > ; --- LONG LINE END
          > > > > ^!IfError Next Else Skip_-1
          > > > >
          > > > >
          > > > > --- In ntb-clips@yahoogroups.com, T L <puusto13@> wrote:
          > > > > >
          > > > > > It works with Matt rather good but there is some bugs like Matt 1:5. Salmonille Booas, jonka äiti oli Raahab. Booakselle syntyi
          > > > > > Oobed, jonka äiti oli Ruut. Oobedille syntyi Iisai Mat_4:13,17...Here?
          > > > > > Matt 4:15. Elihudille Eleasar, Eleasarille Mattan, Mattanille Jaakob.(Mat_15:7,38; Here?
          > > > > >
          > > > > > But how can I got it work with all the Bible books?
          > > > > > (1. Moos.|2. Moos.|3. Moos.|4. Moos.|5. Moos.|Joos.|Tuom.|Ruut|1. Sam.|2. Sam.|1. Kun.|2. Kun.|1. Aik.|2. Aik.|Esra|Neh.|Est.|Job|Ps.|Sananl.|Saarn.|Laul. l.|Jes.|Jer.|Valit.|Hes.|Dan.|Hoos.|Joel|Aam.|Ob.|Joona|Miika|Nah.|Hab.|Sef.|Hagg.|Sak.|Mal.|Matt|Mark|Luuk|Joh.|Ap. t.|Room.|1. Kor.|2. Kor.|Gal.|Ef.|Fil.|Kol.|1. Tess.|2. Tess.|1. Tim.|2. Tim.|Tit.|Filem.|Hepr.|Jaak.|1. Piet.|2. Piet.|1. Joh.|2. Joh.|3. Joh.|Juud.|Ilm.)
          > > > > >
          > > > > > TL
          > > > > >
          > > > > >
          > > > > >
          > > > > > ________________________________
          > > > > > From: John Shotsky <jshotsky@>
          > > > > > To: ntb-clips@yahoogroups.com
          > > > > > Sent: Wednesday, December 19, 2012 12:27 AM
          > > > > > Subject: RE: [Clip] Re: Tooltip clip?
          > > > > >
          > > > > >
          > > > > >  
          > > > > > If I have understood the requirement this time, and if the first word is actually 'Matt' and not 'Mat', then the following will capture each of the Matt bits correctly.
          > > > > > For other words, just repeat these 4 lines with the new words inserted where Matt or Mat is now. If any periods are in doubt, place a question mark after them.
          > > > > > ;===
          > > > > > ;Replace 2nd and any other Matt. with Mat_
          > > > > > ^!Replace "^Matt \d+:\d+.+Mat\Kt\. " >> "_" ARSW
          > > > > > ^!IfError Next Else Skip_-1
          > > > > > ;Add Mat_ to any number/colon series missing it.
          > > > > > ^!Replace "^.+(Mat_)(\d+:\d+)(.+)\K (?=\d+:\d+)" >> " $1" ARSW
          > > > > > ^!IfError Next Else Skip_-1
          > > > > > ;===
          > > > > >
          > > > > > Results with test text:
          > > > > > Matt 1:1. Luku 1 JEESUKSEN SYNTYMÄ JA LAPSUUS Jeesuksen sukuluettelo (Mat_3:23-38). Jeesuksen Kristuksen, Daavidin pojan, Abrahamin pojan, sukuluettelo: Mat_132:11; Mat_1:3; Mat_3:16; Mat_22:16-17. (Mat_15:7,38, Mat_27:9, Mat_28:27
          > > > > > Matt 1:2. Abrahamille syntyi Iisak, Iisakille Jaakob, Jaakobille Juuda ja tämän veljet. Mat_21:3, Mat_29:35
          > > > > > Matt 1:3. Juudalle syntyivät Peres ja Serah, joiden äiti oli Taamar. Perekselle syntyi Hesron, Hesronille Raam, Mat_38:27-30; Mat_4:18-22; Mat_2:4-15
          > > > > > Matt 1:4. Raamille Amminadab, Amminadabille Nahson, Nahsonille Salmon,
          > > > > > Matt 1:5. Salmonille Booas, jonka äiti oli Raahab. Booakselle syntyi Oobed, jonka äiti oli Ruut. Oobedille syntyi Iisai Mat_4:13,17
          > > > > > Matt 1:6. ja Iisaille Daavid, kuningas. Daavidille syntyi Salomo, jonka äiti oli Uurian vaimo. Mat_12:10,24
          > > > > > Matt 1:7. Salomolle syntyi Rehabeam, Rehabeamille Abia, Abialle Aasa, Mat_11:43, Mat_14:31, Mat_15:8
          > > > > > Matt 1:8. Aasalle Joosafat, Joosafatille Jooram, Jooramille Ussia, Mat_15:24; Mat_8:16; Mat_26:1.
          > > > > > Matt 1:9. Ussialle Jootam, Jootamille Aahas, Aahakselle Hiskia, Mat_15:7,38; Mat_27:9, Mat_28:27
          > > > > > Matt 1:10. Hiskialle Manasse, Manasselle Aamon, Aamonille Joosia Mat_20:21, Mat_21:18; Mat_32:33, Mat_33:25: Salmonille Booas, jonka äiti oli Raahab. Booakselle syntyi Oobed, Mat_23:34, Mat_3:15,16; Mat_36:1,8;
          > > > > > Matt 1:11. ja Joosialle Jekonja ja tämän veljet siihen aikaan, kun kansaa siirrettiin Babyloniaan. Mat_23:34, Mat_3:15,16; Mat_36:1,8; Salomolle syntyi Rehabeam, Rehabeamille Abia, Abialle Aasa, Mat_11:43, Mat_14:31, Mat_15:8
          > > > > > Matt 1:12. Babyloniaan siirtämisen jälkeen Jekonjalle syntyi Sealtiel, Sealtielille Serubbaabel, Mat_3:17,19; Mat_3:2
          > > > > > Matt 2:13. Serubbaabelille Abihud, Abihudille Eljakim, Eljakimille Assur, (Mat_15:7,38, Mat_27:9, Mat_28:27).
          > > > > > Matt 3:14. Assurille Saadok, Saadokille Jaakin, Jaakinille Elihud, (Mat_15:7,38; Mat_27:9; Mat_28:27)
          > > > > > Matt 4:15. Elihudille Eleasar, Eleasarille Mattan, Mattanille Jaakob.(Mat_15:7,38; Mat_27:9, Mat_28:27),
          > > > > > Matt 5:16. ja Jaakobille Joosef, Marian mies. Mariasta syntyi Jeesus, jota kutsutaan Kristukseksi1.
          > > > > > Matt 6:17. Abrahamista Daavidiin on siten kaikkiaan neljätoista sukupolvea, Daavidista Babylonian pakkosiirtolaisuuteen asti neljätoista ja Babylonian pakkosiirtolaisuudesta Kristukseen neljätoista sukupolvea. Jeesuksen syntymä (Mat_2:1-7).
          > > > > >
          > > > > > Regards,
          > > > > > John
          > > > > > RecipeTools Web Site: <http://recipetools.gotdns.com/> http://recipetools.gotdns.com/
          > > > > >
          >
        • m.feichtinger
          ... If you want to edit lines beginning not only with Matt , then replace the pattern ? Matt x20 with ? (Matt|Mark|Luuk) x20 Or better use a
          Message 4 of 27 , Dec 22, 2012
          • 0 Attachment
            --- In ntb-clips@yahoogroups.com, "puusto13" <puusto13@...> wrote:
            >
            > Hi,
            >
            > Thanks. I add the books names and use english ABR so it's easier.
            >
            > How to chance this that it can accept every 66 books:^!Replace "(?xJ)^(?<HEAD>Matt\x20\d++:\d++\.?) (?<TEXT>.+) \K
            > I have replaced this (<HEAD>Matt) Matt to Mark.It works ok.
            >

            If you want to edit lines beginning not only with "Matt",
            then replace the <HEAD> pattern

            ?<HEAD>Matt\x20

            with

            ?<HEAD>(Matt|Mark|Luuk)\x20

            Or better use a variable:

            ^!Set %RE_Bookname%=Matt|Mark|Luuk

            and use

            ?<HEAD>(^%RE_Bookname%)\x20

            HTH
          • m.feichtinger
            ... Replace the pattern in the last two ^!Replace commands with (? ( p{Lu}| p{Nd})[ p{L&}]{2}_) ; --- LONG LINE START ^!Replace (?x)^(? .+)
            Message 5 of 27 , Dec 22, 2012
            • 0 Attachment
              --- In ntb-clips@yahoogroups.com, "puusto13" <puusto13@...> wrote:
              >
              > Hi,
              >
              > Example text what is now used. My text is originally this kind of.
              > Mat 1:6. ja Iisaille Daavid, kuningas. Daavidille syntyi Salomo, jonka äiti oli Uurian vaimo. 2Sa. 12:10,24
              > Mat 1:7. Salomolle syntyi Rehabeam, Rehabeamille Abia, Abialle Aasa, 1Ki. 11:43, 14:31, 15:8
              > Mat 1:8. Aasalle Joosafat, Joosafatille Jooram, Jooramille Ussia, 1Ki. 15:24; 2Ki. 8:16; 2Ch. 26:1
              > Mat 1:9. Ussialle Jootam, Jootamille Aahas, Aahakselle Hiskia, 2Ki. 15:7,38; 2Ch. 27:9, 28:27
              > Mat 1:10. Hiskialle Manasse, Manasselle Aamon, Aamonille Joosia 2Ki. 20:21, 21:18; 2Ch. 32:33, 33:25
              > Mat 1:11. ja Joosialle Jekonja ja tämän veljet siihen aikaan, kun kansaa siirrettiin Babyloniaan. 2Ki. 23:34; 1Ch. 3:15,16; 2Ch. 36:1,8
              >
              > ----------------------
              > After this clip:
              > Mat 1:6. ja Iisaille Daavid, kuningas. Daavidille syntyi Salomo, jonka äiti oli Uurian vaimo. 2Sa_12:10, 2Sa_12:24
              > Mat 1:7. Salomolle syntyi Rehabeam, Rehabeamille Abia, Abialle Aasa, 1Ki_11:43, 14:31, 15:8
              > Mat 1:8. Aasalle Joosafat, Joosafatille Jooram, Jooramille Ussia, 1Ki_15:24; 2Ki_8:16; 2Ch_26:1
              > Mat 1:9. Ussialle Jootam, Jootamille Aahas, Aahakselle Hiskia, 2Ki_15:7, 2Ki_15:38; 2Ch_27:9, 28:27
              > Mat 1:10. Hiskialle Manasse, Manasselle Aamon, Aamonille Joosia 2Ki_20:21, 21:18; 2Ch_32:33, 33:25
              > Mat 1:11. ja Joosialle Jekonja ja tämän veljet siihen aikaan, kun kansaa siirrettiin Babyloniaan. 2Ki_23:34; 1Ch_3:15, 1Ch_3:16; 2Ch_36:1, 2Ch_36:8
              >
              > ------------------------
              > I have replaced Abr first number like this 1Ki=Fki, 2Ki=Xki and then replaced back Fki=1Ki, Xki=2Ki etc.....
              > Mat 1:6. ja Iisaille Daavid, kuningas. Daavidille syntyi Salomo, jonka äiti oli Uurian vaimo. 2Sa_12:10, 2Sa_12:24
              > Mat 1:7. Salomolle syntyi Rehabeam, Rehabeamille Abia, Abialle Aasa, 1Ki_11:43, 1Ki_14:31, 1Ki_15:8. 1Ki_11:43; 1Ki_14:31; 1Ki_15:8.
              > Mat 1:8. Aasalle Joosafat, Joosafatille Jooram, Jooramille Ussia, 1Ki_15:24; 2ki_8:16; 2Ch_26:1
              > Mat 1:9. Ussialle Jootam, Jootamille Aahas, Aahakselle Hiskia, 2ki_15:7, 2ki_15:38; 2Ch_27:9, 2Ch_28:27
              > Mat 1:10. Hiskialle Manasse, Manasselle Aamon, Aamonille Joosia 2ki_20:21, 2ki_21:18; 2Ch_32:33, 2Ch_33:25
              > Mat 1:11. ja Joosialle Jekonja ja tämän veljet siihen aikaan, kun kansaa siirrettiin Babyloniaan. 2ki_23:34; 1Ch_3:15, 1Ch_3:16; 2Ch_36:1, 2Ch_36:8
              >
              > Is here something what must yet change? If Xxx=1Ki but if it's Fxx result is ok?
              > ; Change format "Xxx_15:7,38" or "#Xx_15:7,38" (comma not surrounded by spaces!)to "Xxx_15:7, Xxx_15:38" or "#Xx_15:7, #Xx_15:38":
              > ; --- LONG LINE START
              > ^!Replace "(?x)^(?<TEXT>.+) ((?<SN>(\p{Lu}\p{Ll}{2}|\d\p{Lu}\p{Ll})_)(?<CHAP>\d++:)\d++ ) , (?<VERS2>\d++)">> "$<TEXT>$2, $<SN>$<CHAP>$<VERS2>" RWAS
              > ; --- LONG LINE END

              Replace the <SN> pattern in the last two ^!Replace commands with

              (?<SN>(\p{Lu}|\p{Nd})[\p{L&}]{2}_)

              ; --- LONG LINE START
              ^!Replace "(?x)^(?<TEXT>.+) (?<SN> (\p{Lu}|\p{Nd})[\p{L&}]{2}_) (\d++:\d++) (.+) \K \x20 (?=\d++:\d++)" >> " $<SN>" RWAS
              ; --- LONG LINE END
              ^!IfError Next Else Skip_-1

              ; --- LONG LINE START
              ^!Replace "(?x)^(?<TEXT>.+) (?<SN> (\p{Lu}|\p{Nd})[\p{L&}]{2}_) (?<CHAP>\d++:)\d++ , \K (?<VERS2>\d++)" >> " $<SN>$<CHAP>$<VERS2>" RWAS
              ; --- LONG LINE END
              ^!IfError Next Else Skip_-1

              HTH



              >
              > This clip is almost correct.
              >
              > Thank you! To everyone, as well as others who have helped me
              >
              > TL
              >
              > --- In ntb-clips@yahoogroups.com, "m.feichtinger" <mafei@> wrote:
              > >
              > > Hi,
              > >
              > > Replace the lines...
              > >
              > > ; Change format "Xxx_15:7,38" (comma not surrounded by spaces!) to "Xxx_15:7, Xxx_15:38":
              > > ; --- LONG LINE START
              > > ^!Replace "(?x)^(?<TEXT>.+) ( (?<SN>\p{Lu}\p{Ll}{2}_)(?<CHAP>\d++:)\d++ ) , (?<VERS2>\d++)" >> "$<TEXT>$2, $<SN>$<CHAP>$<VERS2>" RWAS
              > > ; --- LONG LINE END
              > >
              > > ... with
              > >
              > > ; Change format "Xxx_15:7,38" or "#Xx_15:7,38" (comma not surrounded by spaces!) to "Xxx_15:7, Xxx_15:38" or "#Xx_15:7, #Xx_15:38":
              > > ; --- LONG LINE START
              > > ^!Replace "(?x)^(?<TEXT>.+) ( (?<SN>(\p{Lu}\p{Ll}{2}|\d\p{Lu}\p{Ll})_)(?<CHAP>\d++:)\d++ ) , (?<VERS2>\d++)" >> "$<TEXT>$2, $<SN>$<CHAP>$<VERS2>" RWAS
              > > ; --- LONG LINE END
              > >
              > > HTH
              > >
              > > --- In ntb-clips@yahoogroups.com, "puusto13" <puusto13@> wrote:
              > > >
              > > > I found new problem if the ABR begins with number like these 1Ki, 2Ki and every others. The clip does print right only the first book, chap and verse. But let others done.
              > > >
              > > > Here is example result:
              > > > Matt 1:11. Babyloniaan. 2Ki_23:34; 1Ki_3:15,16; 2Jo_36:1,8, 2Ch_32:33, 33:25. 2Jo_21:3, 29:35,2Ki_15:7,38;
              > > > Matt 1:12. Sealtiel, Sealtielille Serubbaabel, 1Jo_3:17,19; Ezr_3:2.
              > > >
              > > > TL
              > > >
              > > > --- In ntb-clips@yahoogroups.com, "puusto13" <puusto13@> wrote:
              > > > >
              > > > > Hi,
              > > > >
              > > > > Thanks. I add the books names and use english ABR so it's easier.
              > > > >
              > > > > How to chance this that it can accept every 66 books:^!Replace "(?xJ)^(?<HEAD>Matt\x20\d++:\d++\.?) (?<TEXT>.+) \K
              > > > > I have replaced this (<HEAD>Matt) Matt to Mark.It works ok.
              > > > >
              > > > > My clip is now:
              > > > >
              > > > > ;===
              > > > > ; Replace 2nd and any other Matt. with Mat
              > > > > ;^!Replace "^Matt \d+:\d+.+Mat\Kt\. " >> "" RWAS
              > > > > ; Expand the following book list incl. short names to your liking.
              > > > > ; --- LONG LINE START
              > > > > ^!Replace "(?xJ)^(?<HEAD>Matt\x20\d++:\d++\.?) (?<TEXT>.+) \K ((?#BooklistStart)(?<SN>Gen)(?:)? | (?<SN>Exo)(?:)? | (?<SN>Lev)(?:)? | (?<SN>Num)(?:)? | (?<SN>Deu)(?:)? | (?<SN>Jos)(?:)? | (?<SN>Jdg)(?:)? | (?<SN>Rut)(?:)? | (?<SN>1Sa)(?:)? | (?<SN>2Sa)(?:)? | (?<SN>1Ki)(?:)? | (?<SN>2Ki)(?:)? | (?<SN>1Ch)(?:)? | (?<SN>2Ch)(?:)? | (?<SN>Ezr)(?:)? | (?<SN>Neh)(?:)? | (?<SN>Est)(?:)? | (?<SN>Job)(?:)? | (?<SN>Psa)(?:)? | (?<SN>Pro)(?:)? | (?<SN>Ecc)(?:)? | (?<SN>Son)(?:)? | (?<SN>Isa)(?:)? | (?<SN>Jer)(?:)? | (?<SN>Lam)(?:)? | (?<SN>Eze)(?:)? | (?<SN>Dan)(?:)? | (?<SN>Hos)(?:)? | (?<SN>Joe)(?:)? | (?<SN>Amo)(?:)? | (?<SN>Oba)(?:)? | (?<SN>Jon)(?:)? | (?<SN>Mic)(?:)? | (?<SN>Nah)(?:)? | (?<SN>Hab)(?:)? | (?<SN>Zep)(?:)? | (?<SN>Hag)(?:)? | (?<SN>Zec)(?:)? | (?<SN>Mal)(?:)? | (?<SN>Mat)(?:)? | (?<SN>Mar)(?:)? | (?<SN>Luk)(?:)? | (?<SN>Joh)(?:)? | (?<SN>Act)(?:)? | (?<SN>Rom)(?:)? | (?<SN>1Co)(?:)? | (?<SN>2Co)(?:)? | (?<SN>Gal)(?:)? | (?<SN>Eph)(?:)? | (?<SN>Phi)(?:)? | (?<SN>Col)(?:)? | (?<SN>1Th)(?:)? | (?<SN>2Th)(?:)? | (?<SN>1Ti)(?:)? | (?<SN>2Ti)(?:)? | (?<SN>Tit)(?:)? | (?<SN>Phm)(?:)? | (?<SN>Heb)(?:)? | (?<SN>Jam)(?:)? | (?<SN>1Pe)(?:)? | (?<SN>2Pe)(?:)? | (?<SN>1Jo)(?:)? | (?<SN>2Jo)(?:)? | (?<SN>3Jo)(?:)? | (?<SN>Jud)(?:)? | (?<SN>Rev)(?:)? (?#BooklistEnd)) \.?\x20" >> "$<SN>_" RWAS
              > > > > ; --- LONG LINE END
              > > > > ^!IfError Next Else Skip_-1
              > > > > ;^!Continue Continue?
              > > > >
              > > > > ; Add Mat_ to any number/colon series missing it.
              > > > > ;^!Replace "^.+(Mat_)(\d+:\d+)(.+)\K (?=\d+:\d+)" >> " $1" RWAS
              > > > > ; Add any short name (Xxx_ = uppercase letter, followed by 2 lowercase letters,followed by an underscore) to any number/colon series missing it.
              > > > > ; --- LONG LINE START
              > > > > ^!Replace "(?x)^(?<TEXT>.+) (?<SN>\p{Lu}\p{Ll}{2}_) (\d+:\d+) (.+) \K \x20(?=\d+:\d+)" >> " $<SN>" RWAS
              > > > > ; --- LONG LINE END
              > > > > ^!IfError Next Else Skip_-1
              > > > > ;^!Continue Continue?
              > > > > ;===
              > > > >
              > > > > ; Change format "Xxx_15:7,38" (comma not surrounded by spaces!) to "Xxx_15:7,Xxx_15:38":
              > > > > ; --- LONG LINE START
              > > > > ^!Replace "(?x)^(?<TEXT>.+) ( (?<SN>\p{Lu}\p{Ll}{2}_)(?<CHAP>\d++:)\d++ ) ,(?<VERS2>\d++)" >> "$<TEXT>$2, $<SN>$<CHAP>$<VERS2>" RWAS
              > > > > ; --- LONG LINE END
              > > > > ^!IfError Next Else Skip_-1
              > > > >
              > > > > TL
              > > > >
              > > > >
              > > > > --- In ntb-clips@yahoogroups.com, "m.feichtinger" <mafei@> wrote:
              > > > > >
              > > > > > Hi,
              > > > > >
              > > > > > I took John's suggestion and modified his code. The following clip works on your provided test text.
              > > > > > The (?#...) groups are comments for better readability, you can remove them.
              > > > > > The (?<Name>...) groups are named for convenient reference.
              > > > > > The RegEx containing the book list is taken from "Help > Help on Regular Expression > Named Subpatterns".
              > > > > >
              > > > > > HTH
              > > > > >
              > > > > > ;===
              > > > > > ; Replace 2nd and any other Matt. with Mat_
              > > > > > ;^!Replace "^Matt \d+:\d+.+Mat\Kt\. " >> "_" RWAS
              > > > > > ; Expand the following book list incl. short names to your liking.
              > > > > > ; --- LONG LINE START
              > > > > > ^!Replace "(?xJ)^(?<HEAD>Matt\x20\d++:\d++\.?) (?<TEXT>.+) \K ((?#BooklistStart) (?<SN>Mat)(?:t)? | (?<SN>Mar)(?:k)? | (?<SN>Luu)(?:k)? | (?<SN>Joh)(?:)? | (?<SN>Esr)(?:a)? | (?<SN>Mii)(?:ka)? | (?<SN>Ruu)(?:t)? (?#BooklistEnd)) \.? \x20" >> "$<SN>_" RWAS
              > > > > > ; --- LONG LINE END
              > > > > > ^!IfError Next Else Skip_-1
              > > > > > ;^!Continue Continue?
              > > > > >
              > > > > > ; Add Mat_ to any number/colon series missing it.
              > > > > > ;^!Replace "^.+(Mat_)(\d+:\d+)(.+)\K (?=\d+:\d+)" >> " $1" RWAS
              > > > > > ; Add any short name (Xxx_ = uppercase letter, followed by 2 lowercase letters, followed by an underscore) to any number/colon series missing it.
              > > > > > ; --- LONG LINE START
              > > > > > ^!Replace "(?x)^(?<TEXT>.+) (?<SN>\p{Lu}\p{Ll}{2}_) (\d+:\d+) (.+) \K \x20 (?=\d+:\d+)" >> " $<SN>" RWAS
              > > > > > ; --- LONG LINE END
              > > > > > ^!IfError Next Else Skip_-1
              > > > > > ;^!Continue Continue?
              > > > > > ;===
              > > > > >
              > > > > > ; Change format "Xxx_15:7,38" (comma not surrounded by spaces!) to "Xxx_15:7, Xxx_15:38":
              > > > > > ; --- LONG LINE START
              > > > > > ^!Replace "(?x)^(?<TEXT>.+) ( (?<SN>\p{Lu}\p{Ll}{2}_)(?<CHAP>\d++:)\d++ ) , (?<VERS2>\d++)" >> "$<TEXT>$2, $<SN>$<CHAP>$<VERS2>" RWAS
              > > > > > ; --- LONG LINE END
              > > > > > ^!IfError Next Else Skip_-1
              > > > > >
              > > > > >
              > > > > > --- In ntb-clips@yahoogroups.com, T L <puusto13@> wrote:
              > > > > > >
              > > > > > > It works with Matt rather good but there is some bugs like Matt 1:5. Salmonille Booas, jonka äiti oli Raahab. Booakselle syntyi
              > > > > > > Oobed, jonka äiti oli Ruut. Oobedille syntyi Iisai Mat_4:13,17...Here?
              > > > > > > Matt 4:15. Elihudille Eleasar, Eleasarille Mattan, Mattanille Jaakob.(Mat_15:7,38; Here?
              > > > > > >
              > > > > > > But how can I got it work with all the Bible books?
              > > > > > > (1. Moos.|2. Moos.|3. Moos.|4. Moos.|5. Moos.|Joos.|Tuom.|Ruut|1. Sam.|2. Sam.|1. Kun.|2. Kun.|1. Aik.|2. Aik.|Esra|Neh.|Est.|Job|Ps.|Sananl.|Saarn.|Laul. l.|Jes.|Jer.|Valit.|Hes.|Dan.|Hoos.|Joel|Aam.|Ob.|Joona|Miika|Nah.|Hab.|Sef.|Hagg.|Sak.|Mal.|Matt|Mark|Luuk|Joh.|Ap. t.|Room.|1. Kor.|2. Kor.|Gal.|Ef.|Fil.|Kol.|1. Tess.|2. Tess.|1. Tim.|2. Tim.|Tit.|Filem.|Hepr.|Jaak.|1. Piet.|2. Piet.|1. Joh.|2. Joh.|3. Joh.|Juud.|Ilm.)
              > > > > > >
              > > > > > > TL
              > > > > > >
              > > > > > >
              > > > > > >
              > > > > > > ________________________________
              > > > > > > From: John Shotsky <jshotsky@>
              > > > > > > To: ntb-clips@yahoogroups.com
              > > > > > > Sent: Wednesday, December 19, 2012 12:27 AM
              > > > > > > Subject: RE: [Clip] Re: Tooltip clip?
              > > > > > >
              > > > > > >
              > > > > > >  
              > > > > > > If I have understood the requirement this time, and if the first word is actually 'Matt' and not 'Mat', then the following will capture each of the Matt bits correctly.
              > > > > > > For other words, just repeat these 4 lines with the new words inserted where Matt or Mat is now. If any periods are in doubt, place a question mark after them.
              > > > > > > ;===
              > > > > > > ;Replace 2nd and any other Matt. with Mat_
              > > > > > > ^!Replace "^Matt \d+:\d+.+Mat\Kt\. " >> "_" ARSW
              > > > > > > ^!IfError Next Else Skip_-1
              > > > > > > ;Add Mat_ to any number/colon series missing it.
              > > > > > > ^!Replace "^.+(Mat_)(\d+:\d+)(.+)\K (?=\d+:\d+)" >> " $1" ARSW
              > > > > > > ^!IfError Next Else Skip_-1
              > > > > > > ;===
              > > > > > >
              > > > > > > Results with test text:
              > > > > > > Matt 1:1. Luku 1 JEESUKSEN SYNTYMÄ JA LAPSUUS Jeesuksen sukuluettelo (Mat_3:23-38). Jeesuksen Kristuksen, Daavidin pojan, Abrahamin pojan, sukuluettelo: Mat_132:11; Mat_1:3; Mat_3:16; Mat_22:16-17. (Mat_15:7,38, Mat_27:9, Mat_28:27
              > > > > > > Matt 1:2. Abrahamille syntyi Iisak, Iisakille Jaakob, Jaakobille Juuda ja tämän veljet. Mat_21:3, Mat_29:35
              > > > > > > Matt 1:3. Juudalle syntyivät Peres ja Serah, joiden äiti oli Taamar. Perekselle syntyi Hesron, Hesronille Raam, Mat_38:27-30; Mat_4:18-22; Mat_2:4-15
              > > > > > > Matt 1:4. Raamille Amminadab, Amminadabille Nahson, Nahsonille Salmon,
              > > > > > > Matt 1:5. Salmonille Booas, jonka äiti oli Raahab. Booakselle syntyi Oobed, jonka äiti oli Ruut. Oobedille syntyi Iisai Mat_4:13,17
              > > > > > > Matt 1:6. ja Iisaille Daavid, kuningas. Daavidille syntyi Salomo, jonka äiti oli Uurian vaimo. Mat_12:10,24
              > > > > > > Matt 1:7. Salomolle syntyi Rehabeam, Rehabeamille Abia, Abialle Aasa, Mat_11:43, Mat_14:31, Mat_15:8
              > > > > > > Matt 1:8. Aasalle Joosafat, Joosafatille Jooram, Jooramille Ussia, Mat_15:24; Mat_8:16; Mat_26:1.
              > > > > > > Matt 1:9. Ussialle Jootam, Jootamille Aahas, Aahakselle Hiskia, Mat_15:7,38; Mat_27:9, Mat_28:27
              > > > > > > Matt 1:10. Hiskialle Manasse, Manasselle Aamon, Aamonille Joosia Mat_20:21, Mat_21:18; Mat_32:33, Mat_33:25: Salmonille Booas, jonka äiti oli Raahab. Booakselle syntyi Oobed, Mat_23:34, Mat_3:15,16; Mat_36:1,8;
              > > > > > > Matt 1:11. ja Joosialle Jekonja ja tämän veljet siihen aikaan, kun kansaa siirrettiin Babyloniaan. Mat_23:34, Mat_3:15,16; Mat_36:1,8; Salomolle syntyi Rehabeam, Rehabeamille Abia, Abialle Aasa, Mat_11:43, Mat_14:31, Mat_15:8
              > > > > > > Matt 1:12. Babyloniaan siirtämisen jälkeen Jekonjalle syntyi Sealtiel, Sealtielille Serubbaabel, Mat_3:17,19; Mat_3:2
              > > > > > > Matt 2:13. Serubbaabelille Abihud, Abihudille Eljakim, Eljakimille Assur, (Mat_15:7,38, Mat_27:9, Mat_28:27).
              > > > > > > Matt 3:14. Assurille Saadok, Saadokille Jaakin, Jaakinille Elihud, (Mat_15:7,38; Mat_27:9; Mat_28:27)
              > > > > > > Matt 4:15. Elihudille Eleasar, Eleasarille Mattan, Mattanille Jaakob.(Mat_15:7,38; Mat_27:9, Mat_28:27),
              > > > > > > Matt 5:16. ja Jaakobille Joosef, Marian mies. Mariasta syntyi Jeesus, jota kutsutaan Kristukseksi1.
              > > > > > > Matt 6:17. Abrahamista Daavidiin on siten kaikkiaan neljätoista sukupolvea, Daavidista Babylonian pakkosiirtolaisuuteen asti neljätoista ja Babylonian pakkosiirtolaisuudesta Kristukseen neljätoista sukupolvea. Jeesuksen syntymä (Mat_2:1-7).
              > > > > > >
              > > > > > > Regards,
              > > > > > > John
              > > > > > > RecipeTools Web Site: <http://recipetools.gotdns.com/> http://recipetools.gotdns.com/
              > > > > > >
              > >
              >
            • puusto13
              Hi, Thanks! Now it works ok with ABR. But Finnish language has word jos. One English Bible ABR is Jos. Example text: Mat 1:1 Jos te jne. Mat 1:1 Jos_te jne.
              Message 6 of 27 , Dec 22, 2012
              • 0 Attachment
                Hi,

                Thanks! Now it works ok with ABR.
                But
                Finnish language has word jos.
                One English Bible ABR is Jos.
                Example text:
                Mat 1:1 Jos te jne.
                Mat 1:1 Jos_te jne. Wrong.

                Mat 1:1 Te jos te jne.
                Mat 1:1 Te jos te jne. Ok.

                I found this. This is not problem because I can replace Jos=Joz
                Then use this clip and replace Joz=Jos.

                TL

                --- In ntb-clips@yahoogroups.com, "m.feichtinger" <mafei@...> wrote:

                > --- In ntb-clips@yahoogroups.com, "puusto13" <puusto13@> wrote:

                > > Example text what is now used. My text is originally this kind of.
                > > Mat 1:6. ja Iisaille Daavid, kuningas. Daavidille syntyi Salomo, jonka äiti oli Uurian vaimo. 2Sa. 12:10,24
                > > Mat 1:7. Salomolle syntyi Rehabeam, Rehabeamille Abia, Abialle Aasa, 1Ki. 11:43, 14:31, 15:8
                > > Mat 1:8. Aasalle Joosafat, Joosafatille Jooram, Jooramille Ussia, 1Ki. 15:24; 2Ki. 8:16; 2Ch. 26:1
                > > Mat 1:9. Ussialle Jootam, Jootamille Aahas, Aahakselle Hiskia, 2Ki. 15:7,38; 2Ch. 27:9, 28:27
                > > Mat 1:10. Hiskialle Manasse, Manasselle Aamon, Aamonille Joosia 2Ki. 20:21, 21:18; 2Ch. 32:33, 33:25
                > > Mat 1:11. ja Joosialle Jekonja ja tämän veljet siihen aikaan, kun kansaa siirrettiin Babyloniaan. 2Ki. 23:34; 1Ch. 3:15,16; 2Ch. 36:1,8
                > >
                > > ----------------------
                > > After this clip:
                > > Mat 1:6. ja Iisaille Daavid, kuningas. Daavidille syntyi Salomo, jonka äiti oli Uurian vaimo. 2Sa_12:10, 2Sa_12:24
                > > Mat 1:7. Salomolle syntyi Rehabeam, Rehabeamille Abia, Abialle Aasa, 1Ki_11:43, 14:31, 15:8
                > > Mat 1:8. Aasalle Joosafat, Joosafatille Jooram, Jooramille Ussia, 1Ki_15:24; 2Ki_8:16; 2Ch_26:1
                > > Mat 1:9. Ussialle Jootam, Jootamille Aahas, Aahakselle Hiskia, 2Ki_15:7, 2Ki_15:38; 2Ch_27:9, 28:27
                > > Mat 1:10. Hiskialle Manasse, Manasselle Aamon, Aamonille Joosia 2Ki_20:21, 21:18; 2Ch_32:33, 33:25
                > > Mat 1:11. ja Joosialle Jekonja ja tämän veljet siihen aikaan, kun kansaa siirrettiin Babyloniaan. 2Ki_23:34; 1Ch_3:15, 1Ch_3:16; 2Ch_36:1, 2Ch_36:8
                > >
                > > ------------------------
                > > I have replaced Abr first number like this 1Ki=Fki, 2Ki=Xki and then replaced back Fki=1Ki, Xki=2Ki etc.....
                > > Mat 1:6. ja Iisaille Daavid, kuningas. Daavidille syntyi Salomo, jonka äiti oli Uurian vaimo. 2Sa_12:10, 2Sa_12:24
                > > Mat 1:7. Salomolle syntyi Rehabeam, Rehabeamille Abia, Abialle Aasa, 1Ki_11:43, 1Ki_14:31, 1Ki_15:8. 1Ki_11:43; 1Ki_14:31; 1Ki_15:8.
                > > Mat 1:8. Aasalle Joosafat, Joosafatille Jooram, Jooramille Ussia, 1Ki_15:24; 2ki_8:16; 2Ch_26:1
                > > Mat 1:9. Ussialle Jootam, Jootamille Aahas, Aahakselle Hiskia, 2ki_15:7, 2ki_15:38; 2Ch_27:9, 2Ch_28:27
                > > Mat 1:10. Hiskialle Manasse, Manasselle Aamon, Aamonille Joosia 2ki_20:21, 2ki_21:18; 2Ch_32:33, 2Ch_33:25
                > > Mat 1:11. ja Joosialle Jekonja ja tämän veljet siihen aikaan, kun kansaa siirrettiin Babyloniaan. 2ki_23:34; 1Ch_3:15, 1Ch_3:16; 2Ch_36:1, 2Ch_36:8
                > >
                > > Is here something what must yet change? If Xxx=1Ki but if it's Fxx result is ok?
                > > ; Change format "Xxx_15:7,38" or "#Xx_15:7,38" (comma not surrounded by spaces!)to "Xxx_15:7, Xxx_15:38" or "#Xx_15:7, #Xx_15:38":
                > > ; --- LONG LINE START
                > > ^!Replace "(?x)^(?<TEXT>.+) ((?<SN>(\p{Lu}\p{Ll}{2}|\d\p{Lu}\p{Ll})_)(?<CHAP>\d++:)\d++ ) , (?<VERS2>\d++)">> "$<TEXT>$2, $<SN>$<CHAP>$<VERS2>" RWAS
                > > ; --- LONG LINE END
                >
                > Replace the <SN> pattern in the last two ^!Replace commands with
                >
                > (?<SN>(\p{Lu}|\p{Nd})[\p{L&}]{2}_)
                >
                > ; --- LONG LINE START
                > ^!Replace "(?x)^(?<TEXT>.+) (?<SN> (\p{Lu}|\p{Nd})[\p{L&}]{2}_) (\d++:\d++) (.+) \K \x20 (?=\d++:\d++)" >> " $<SN>" RWAS
                > ; --- LONG LINE END
                > ^!IfError Next Else Skip_-1
                >
                > ; --- LONG LINE START
                > ^!Replace "(?x)^(?<TEXT>.+) (?<SN> (\p{Lu}|\p{Nd})[\p{L&}]{2}_) (?<CHAP>\d++:)\d++ , \K (?<VERS2>\d++)" >> " $<SN>$<CHAP>$<VERS2>" RWAS
                > ; --- LONG LINE END
                > ^!IfError Next Else Skip_-1
                >
                > HTH
                >
                >
                >
                > >
                > > This clip is almost correct.
                > >
                > > Thank you! To everyone, as well as others who have helped me
                > >
                > > TL
                > >
                > > --- In ntb-clips@yahoogroups.com, "m.feichtinger" <mafei@> wrote:
                > > >
                > > > Hi,
                > > >
                > > > Replace the lines...
                > > >
                > > > ; Change format "Xxx_15:7,38" (comma not surrounded by spaces!) to "Xxx_15:7, Xxx_15:38":
                > > > ; --- LONG LINE START
                > > > ^!Replace "(?x)^(?<TEXT>.+) ( (?<SN>\p{Lu}\p{Ll}{2}_)(?<CHAP>\d++:)\d++ ) , (?<VERS2>\d++)" >> "$<TEXT>$2, $<SN>$<CHAP>$<VERS2>" RWAS
                > > > ; --- LONG LINE END
                > > >
                > > > ... with
                > > >
                > > > ; Change format "Xxx_15:7,38" or "#Xx_15:7,38" (comma not surrounded by spaces!) to "Xxx_15:7, Xxx_15:38" or "#Xx_15:7, #Xx_15:38":
                > > > ; --- LONG LINE START
                > > > ^!Replace "(?x)^(?<TEXT>.+) ( (?<SN>(\p{Lu}\p{Ll}{2}|\d\p{Lu}\p{Ll})_)(?<CHAP>\d++:)\d++ ) , (?<VERS2>\d++)" >> "$<TEXT>$2, $<SN>$<CHAP>$<VERS2>" RWAS
                > > > ; --- LONG LINE END
                > > >
                > > > HTH
                > > >
                > > > --- In ntb-clips@yahoogroups.com, "puusto13" <puusto13@> wrote:
                > > > >
                > > > > I found new problem if the ABR begins with number like these 1Ki, 2Ki and every others. The clip does print right only the first book, chap and verse. But let others done.
                > > > >
                > > > > Here is example result:
                > > > > Matt 1:11. Babyloniaan. 2Ki_23:34; 1Ki_3:15,16; 2Jo_36:1,8, 2Ch_32:33, 33:25. 2Jo_21:3, 29:35,2Ki_15:7,38;
                > > > > Matt 1:12. Sealtiel, Sealtielille Serubbaabel, 1Jo_3:17,19; Ezr_3:2.
                > > > >
                > > > > TL
                > > > >
                > > > > --- In ntb-clips@yahoogroups.com, "puusto13" <puusto13@> wrote:
                > > > > >
                > > > > > Hi,
                > > > > >
                > > > > > Thanks. I add the books names and use english ABR so it's easier.
                > > > > >
                > > > > > How to chance this that it can accept every 66 books:^!Replace "(?xJ)^(?<HEAD>Matt\x20\d++:\d++\.?) (?<TEXT>.+) \K
                > > > > > I have replaced this (<HEAD>Matt) Matt to Mark.It works ok.
                > > > > >
                > > > > > My clip is now:
                > > > > >
                > > > > > ;===
                > > > > > ; Replace 2nd and any other Matt. with Mat
                > > > > > ;^!Replace "^Matt \d+:\d+.+Mat\Kt\. " >> "" RWAS
                > > > > > ; Expand the following book list incl. short names to your liking.
                > > > > > ; --- LONG LINE START
                > > > > > ^!Replace "(?xJ)^(?<HEAD>Matt\x20\d++:\d++\.?) (?<TEXT>.+) \K ((?#BooklistStart)(?<SN>Gen)(?:)? | (?<SN>Exo)(?:)? | (?<SN>Lev)(?:)? | (?<SN>Num)(?:)? | (?<SN>Deu)(?:)? | (?<SN>Jos)(?:)? | (?<SN>Jdg)(?:)? | (?<SN>Rut)(?:)? | (?<SN>1Sa)(?:)? | (?<SN>2Sa)(?:)? | (?<SN>1Ki)(?:)? | (?<SN>2Ki)(?:)? | (?<SN>1Ch)(?:)? | (?<SN>2Ch)(?:)? | (?<SN>Ezr)(?:)? | (?<SN>Neh)(?:)? | (?<SN>Est)(?:)? | (?<SN>Job)(?:)? | (?<SN>Psa)(?:)? | (?<SN>Pro)(?:)? | (?<SN>Ecc)(?:)? | (?<SN>Son)(?:)? | (?<SN>Isa)(?:)? | (?<SN>Jer)(?:)? | (?<SN>Lam)(?:)? | (?<SN>Eze)(?:)? | (?<SN>Dan)(?:)? | (?<SN>Hos)(?:)? | (?<SN>Joe)(?:)? | (?<SN>Amo)(?:)? | (?<SN>Oba)(?:)? | (?<SN>Jon)(?:)? | (?<SN>Mic)(?:)? | (?<SN>Nah)(?:)? | (?<SN>Hab)(?:)? | (?<SN>Zep)(?:)? | (?<SN>Hag)(?:)? | (?<SN>Zec)(?:)? | (?<SN>Mal)(?:)? | (?<SN>Mat)(?:)? | (?<SN>Mar)(?:)? | (?<SN>Luk)(?:)? | (?<SN>Joh)(?:)? | (?<SN>Act)(?:)? | (?<SN>Rom)(?:)? | (?<SN>1Co)(?:)? | (?<SN>2Co)(?:)? | (?<SN>Gal)(?:)? | (?<SN>Eph)(?:)? | (?<SN>Phi)(?:)? | (?<SN>Col)(?:)? | (?<SN>1Th)(?:)? | (?<SN>2Th)(?:)? | (?<SN>1Ti)(?:)? | (?<SN>2Ti)(?:)? | (?<SN>Tit)(?:)? | (?<SN>Phm)(?:)? | (?<SN>Heb)(?:)? | (?<SN>Jam)(?:)? | (?<SN>1Pe)(?:)? | (?<SN>2Pe)(?:)? | (?<SN>1Jo)(?:)? | (?<SN>2Jo)(?:)? | (?<SN>3Jo)(?:)? | (?<SN>Jud)(?:)? | (?<SN>Rev)(?:)? (?#BooklistEnd)) \.?\x20" >> "$<SN>_" RWAS
                > > > > > ; --- LONG LINE END
                > > > > > ^!IfError Next Else Skip_-1
                > > > > > ;^!Continue Continue?
                > > > > >
                > > > > > ; Add Mat_ to any number/colon series missing it.
                > > > > > ;^!Replace "^.+(Mat_)(\d+:\d+)(.+)\K (?=\d+:\d+)" >> " $1" RWAS
                > > > > > ; Add any short name (Xxx_ = uppercase letter, followed by 2 lowercase letters,followed by an underscore) to any number/colon series missing it.
                > > > > > ; --- LONG LINE START
                > > > > > ^!Replace "(?x)^(?<TEXT>.+) (?<SN>\p{Lu}\p{Ll}{2}_) (\d+:\d+) (.+) \K \x20(?=\d+:\d+)" >> " $<SN>" RWAS
                > > > > > ; --- LONG LINE END
                > > > > > ^!IfError Next Else Skip_-1
                > > > > > ;^!Continue Continue?
                > > > > > ;===
                > > > > >
                > > > > > ; Change format "Xxx_15:7,38" (comma not surrounded by spaces!) to "Xxx_15:7,Xxx_15:38":
                > > > > > ; --- LONG LINE START
                > > > > > ^!Replace "(?x)^(?<TEXT>.+) ( (?<SN>\p{Lu}\p{Ll}{2}_)(?<CHAP>\d++:)\d++ ) ,(?<VERS2>\d++)" >> "$<TEXT>$2, $<SN>$<CHAP>$<VERS2>" RWAS
                > > > > > ; --- LONG LINE END
                > > > > > ^!IfError Next Else Skip_-1
                > > > > >
                > > > > > TL
                > > > > >
                > > > > >
                > > > > > --- In ntb-clips@yahoogroups.com, "m.feichtinger" <mafei@> wrote:
                > > > > > >
                > > > > > > Hi,
                > > > > > >
                > > > > > > I took John's suggestion and modified his code. The following clip works on your provided test text.
                > > > > > > The (?#...) groups are comments for better readability, you can remove them.
                > > > > > > The (?<Name>...) groups are named for convenient reference.
                > > > > > > The RegEx containing the book list is taken from "Help > Help on Regular Expression > Named Subpatterns".
                > > > > > >
                > > > > > > HTH
                > > > > > >
                > > > > > > ;===
                > > > > > > ; Replace 2nd and any other Matt. with Mat_
                > > > > > > ;^!Replace "^Matt \d+:\d+.+Mat\Kt\. " >> "_" RWAS
                > > > > > > ; Expand the following book list incl. short names to your liking.
                > > > > > > ; --- LONG LINE START
                > > > > > > ^!Replace "(?xJ)^(?<HEAD>Matt\x20\d++:\d++\.?) (?<TEXT>.+) \K ((?#BooklistStart) (?<SN>Mat)(?:t)? | (?<SN>Mar)(?:k)? | (?<SN>Luu)(?:k)? | (?<SN>Joh)(?:)? | (?<SN>Esr)(?:a)? | (?<SN>Mii)(?:ka)? | (?<SN>Ruu)(?:t)? (?#BooklistEnd)) \.? \x20" >> "$<SN>_" RWAS
                > > > > > > ; --- LONG LINE END
                > > > > > > ^!IfError Next Else Skip_-1
                > > > > > > ;^!Continue Continue?
                > > > > > >
                > > > > > > ; Add Mat_ to any number/colon series missing it.
                > > > > > > ;^!Replace "^.+(Mat_)(\d+:\d+)(.+)\K (?=\d+:\d+)" >> " $1" RWAS
                > > > > > > ; Add any short name (Xxx_ = uppercase letter, followed by 2 lowercase letters, followed by an underscore) to any number/colon series missing it.
                > > > > > > ; --- LONG LINE START
                > > > > > > ^!Replace "(?x)^(?<TEXT>.+) (?<SN>\p{Lu}\p{Ll}{2}_) (\d+:\d+) (.+) \K \x20 (?=\d+:\d+)" >> " $<SN>" RWAS
                > > > > > > ; --- LONG LINE END
                > > > > > > ^!IfError Next Else Skip_-1
                > > > > > > ;^!Continue Continue?
                > > > > > > ;===
                > > > > > >
                > > > > > > ; Change format "Xxx_15:7,38" (comma not surrounded by spaces!) to "Xxx_15:7, Xxx_15:38":
                > > > > > > ; --- LONG LINE START
                > > > > > > ^!Replace "(?x)^(?<TEXT>.+) ( (?<SN>\p{Lu}\p{Ll}{2}_)(?<CHAP>\d++:)\d++ ) , (?<VERS2>\d++)" >> "$<TEXT>$2, $<SN>$<CHAP>$<VERS2>" RWAS
                > > > > > > ; --- LONG LINE END
                > > > > > > ^!IfError Next Else Skip_-1
                > > > > > >
                > > > > > >
                > > > > > > --- In ntb-clips@yahoogroups.com, T L <puusto13@> wrote:
                > > > > > > >
                > > > > > > > It works with Matt rather good but there is some bugs like Matt 1:5. Salmonille Booas, jonka äiti oli Raahab. Booakselle syntyi
                > > > > > > > Oobed, jonka äiti oli Ruut. Oobedille syntyi Iisai Mat_4:13,17...Here?
                > > > > > > > Matt 4:15. Elihudille Eleasar, Eleasarille Mattan, Mattanille Jaakob.(Mat_15:7,38; Here?
                > > > > > > >
                > > > > > > > But how can I got it work with all the Bible books?
                > > > > > > > (1. Moos.|2. Moos.|3. Moos.|4. Moos.|5. Moos.|Joos.|Tuom.|Ruut|1. Sam.|2. Sam.|1. Kun.|2. Kun.|1. Aik.|2. Aik.|Esra|Neh.|Est.|Job|Ps.|Sananl.|Saarn.|Laul. l.|Jes.|Jer.|Valit.|Hes.|Dan.|Hoos.|Joel|Aam.|Ob.|Joona|Miika|Nah.|Hab.|Sef.|Hagg.|Sak.|Mal.|Matt|Mark|Luuk|Joh.|Ap. t.|Room.|1. Kor.|2. Kor.|Gal.|Ef.|Fil.|Kol.|1. Tess.|2. Tess.|1. Tim.|2. Tim.|Tit.|Filem.|Hepr.|Jaak.|1. Piet.|2. Piet.|1. Joh.|2. Joh.|3. Joh.|Juud.|Ilm.)
                > > > > > > >
                > > > > > > > TL
                > > > > > > >
                > > > > > > >
                > > > > > > >
                > > > > > > > ________________________________
                > > > > > > > From: John Shotsky <jshotsky@>
                > > > > > > > To: ntb-clips@yahoogroups.com
                > > > > > > > Sent: Wednesday, December 19, 2012 12:27 AM
                > > > > > > > Subject: RE: [Clip] Re: Tooltip clip?
                > > > > > > >
                > > > > > > >
                > > > > > > >  
                > > > > > > > If I have understood the requirement this time, and if the first word is actually 'Matt' and not 'Mat', then the following will capture each of the Matt bits correctly.
                > > > > > > > For other words, just repeat these 4 lines with the new words inserted where Matt or Mat is now. If any periods are in doubt, place a question mark after them.
                > > > > > > > ;===
                > > > > > > > ;Replace 2nd and any other Matt. with Mat_
                > > > > > > > ^!Replace "^Matt \d+:\d+.+Mat\Kt\. " >> "_" ARSW
                > > > > > > > ^!IfError Next Else Skip_-1
                > > > > > > > ;Add Mat_ to any number/colon series missing it.
                > > > > > > > ^!Replace "^.+(Mat_)(\d+:\d+)(.+)\K (?=\d+:\d+)" >> " $1" ARSW
                > > > > > > > ^!IfError Next Else Skip_-1
                > > > > > > > ;===
                > > > > > > >
                > > > > > > > Results with test text:
                > > > > > > > Matt 1:1. Luku 1 JEESUKSEN SYNTYMÄ JA LAPSUUS Jeesuksen sukuluettelo (Mat_3:23-38). Jeesuksen Kristuksen, Daavidin pojan, Abrahamin pojan, sukuluettelo: Mat_132:11; Mat_1:3; Mat_3:16; Mat_22:16-17. (Mat_15:7,38, Mat_27:9, Mat_28:27
                > > > > > > > Matt 1:2. Abrahamille syntyi Iisak, Iisakille Jaakob, Jaakobille Juuda ja tämän veljet. Mat_21:3, Mat_29:35
                > > > > > > > Matt 1:3. Juudalle syntyivät Peres ja Serah, joiden äiti oli Taamar. Perekselle syntyi Hesron, Hesronille Raam, Mat_38:27-30; Mat_4:18-22; Mat_2:4-15
                > > > > > > > Matt 1:4. Raamille Amminadab, Amminadabille Nahson, Nahsonille Salmon,
                > > > > > > > Matt 1:5. Salmonille Booas, jonka äiti oli Raahab. Booakselle syntyi Oobed, jonka äiti oli Ruut. Oobedille syntyi Iisai Mat_4:13,17
                > > > > > > > Matt 1:6. ja Iisaille Daavid, kuningas. Daavidille syntyi Salomo, jonka äiti oli Uurian vaimo. Mat_12:10,24
                > > > > > > > Matt 1:7. Salomolle syntyi Rehabeam, Rehabeamille Abia, Abialle Aasa, Mat_11:43, Mat_14:31, Mat_15:8
                > > > > > > > Matt 1:8. Aasalle Joosafat, Joosafatille Jooram, Jooramille Ussia, Mat_15:24; Mat_8:16; Mat_26:1.
                > > > > > > > Matt 1:9. Ussialle Jootam, Jootamille Aahas, Aahakselle Hiskia, Mat_15:7,38; Mat_27:9, Mat_28:27
                > > > > > > > Matt 1:10. Hiskialle Manasse, Manasselle Aamon, Aamonille Joosia Mat_20:21, Mat_21:18; Mat_32:33, Mat_33:25: Salmonille Booas, jonka äiti oli Raahab. Booakselle syntyi Oobed, Mat_23:34, Mat_3:15,16; Mat_36:1,8;
                > > > > > > > Matt 1:11. ja Joosialle Jekonja ja tämän veljet siihen aikaan, kun kansaa siirrettiin Babyloniaan. Mat_23:34, Mat_3:15,16; Mat_36:1,8; Salomolle syntyi Rehabeam, Rehabeamille Abia, Abialle Aasa, Mat_11:43, Mat_14:31, Mat_15:8
                > > > > > > > Matt 1:12. Babyloniaan siirtämisen jälkeen Jekonjalle syntyi Sealtiel, Sealtielille Serubbaabel, Mat_3:17,19; Mat_3:2
                > > > > > > > Matt 2:13. Serubbaabelille Abihud, Abihudille Eljakim, Eljakimille Assur, (Mat_15:7,38, Mat_27:9, Mat_28:27).
                > > > > > > > Matt 3:14. Assurille Saadok, Saadokille Jaakin, Jaakinille Elihud, (Mat_15:7,38; Mat_27:9; Mat_28:27)
                > > > > > > > Matt 4:15. Elihudille Eleasar, Eleasarille Mattan, Mattanille Jaakob.(Mat_15:7,38; Mat_27:9, Mat_28:27),
                > > > > > > > Matt 5:16. ja Jaakobille Joosef, Marian mies. Mariasta syntyi Jeesus, jota kutsutaan Kristukseksi1.
                > > > > > > > Matt 6:17. Abrahamista Daavidiin on siten kaikkiaan neljätoista sukupolvea, Daavidista Babylonian pakkosiirtolaisuuteen asti neljätoista ja Babylonian pakkosiirtolaisuudesta Kristukseen neljätoista sukupolvea. Jeesuksen syntymä (Mat_2:1-7).
                > > > > > > >
                > > > > > > > Regards,
                > > > > > > > John
                > > > > > > > RecipeTools Web Site: <http://recipetools.gotdns.com/> http://recipetools.gotdns.com/
                > > > > > > >
                > > >
                > >
                >
              Your message has been successfully submitted and would be delivered to recipients shortly.