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

Re: Replace and move text

Expand Messages
  • John Zeman
    Here s a quick untested clip that should do what you want. John ; Replace all leading zeroes at the beginning of lines ^!Replace ^0+ ^%EMPTY% ATIWSR
    Message 1 of 2 , Feb 10, 2004
    • 0 Attachment
      Here's a quick untested clip that should do what you want.
      John

      ; Replace all leading zeroes at the beginning of lines
      ^!Replace "^0+" >> "^%EMPTY%" ATIWSR

      ;Replace all leading zeroes after : at the beginning of lines
      ^!Replace "^{[0-9]+:}0+" >> "\1" ATIWSR

      ;Add line break and other text.
      ^!Replace "{[0-9]+:[0-9]+}\s*" >> "\$\$\$ Mt. \1\n" ATIWSR





      --- In ntb-clips@yahoogroups.com, "Sperry Russ" <sperry@n...> wrote:
      > Is there a clip wizard or can one be made easily that would strip
      > out progressive numbers in front of text and replace it while
      > moving the lines of text down below the numbers? I am trying to
      make
      > a bible module. Attached are 2 example files. I want to
      > replace the numbers in front of the verses in the file named
      > "file_1" with the number format in the file named "file_2". Then
      move
      > the verse down below the number like it looks now in "file_2". The
      > end result would look like the text in the "file_2
      >
      > I am a beginner in clip programming and regular expressions.
      >
      > Thanks,
      > Sperry
      >
      > -------------------
      > (file_1)
      >
      > 001:001 The Genealogy of Jesus Christ, the son of David, the son of
      > Abraham.
      > 001:002 Abraham was the father of Isaac; Isaac of Jacob; Jacob of
      > Judah
      > and his brothers.
      > 001:003 Judah was the father (by Tamar) of Perez and Zerah; Perez
      > of Hezron; Hezron of Ram;
      > 001:004 Ram of Amminadab; Amminadab of Nahshon; Nahshon of Salmon;
      > 001:005 Salmon (by Rahab) of Boaz; Boaz (by Ruth) of Obed; Obed of
      > Jesse;
      > 001:006 Jesse of David--the King. David (by Uriah's widow)
      > was the father of Solomon;
      > 001:007 Solomon of Rehoboam; Rehoboam of Abijah; Abijah of Asa;
      > 001:008 Asa of Jehoshaphat; Jehoshaphat of Jehoram; Jehoram of
      Uzziah;
      > 001:009 Uzziah of Jotham; Jotham of Ahaz; Ahaz of Hezekiah;
      > 001:010 Hezekiah of Manasseh; Manasseh of Amon; Amon of Josiah;
      > 001:011 Josiah of Jeconiah and his brothers at the period of the
      > Removal to Babylon.
      > 001:012 After the Removal to Babylon Jeconiah had a son Shealtiel;
      > Shealtiel
      > was the father of Zerubbabel;
      > 001:013 Zerubbabel of Abiud; Abiud of Eliakim; Eliakim of Azor;
      > 001:014 Azor of Zadok; Zadok of Achim; Achim of Eliud;
      > 001:015 Eliud of Eleazar; Eleazar of Matthan; Matthan of Jacob;
      > 001:016 and Jacob of Joseph the husband of Mary, who was the mother
      > of JESUS who is called CHRIST.
      > --------------------------------
      > (file_2)
      >
      > $$$ Mt 1:1
      > The Genealogy of Jesus Christ, the son of David, the son of
      Abraham.
      > $$$ Mt 1:2
      > Abraham was the father of Isaac; Isaac of Jacob; Jacob of Judah and
      > his brothers.
      > $$$ Mt 1:3
      > Judah was the father (by Tamar) of Perez and Zerah; Perez of
      Hezron;
      > Hezron of Ram;
      > $$$ Mt 1:4
      > $$$ Mt 1:5
      > $$$ Mt 1:6
      > $$$ Mt 1:7
      > $$$ Mt 1:8
      > $$$ Mt 1:9
      > $$$ Mt 1:10
      > $$$ Mt 1:11
      > $$$ Mt 1:12
      > $$$ Mt 1:13
      > $$$ Mt 1:14
      > $$$ Mt 1:15
      > $$$ Mt 1:16
    Your message has been successfully submitted and would be delivered to recipients shortly.