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

Re: [Clip] find line in string

Expand Messages
  • hugo_paulissen <h.paulissen@facburfdcw.u
    Alan, Manuel, ... monitor video screen) method exists, most of the following is merely a way using that method. (a change delimiter option is included too,
    Message 1 of 19 , Feb 24 4:13 PM
    • 0 Attachment
      Alan, Manuel,

      >
      > a ^!Find (item in a doc, albeit it's a doc that's not shown on the
      monitor video screen) method exists, most of the following is merely
      a way using that method. (a change delimiter option is included too,
      just for fun)

      That was my first thought too - just make a new doc in which you
      search for the desired string. But then I thought it would be nice to
      handle it in the string itself - but that requires some more
      handling...


      >
      > Hugo, is it always that there's a ^p at the very end of an (input
      data) string? (in the case that the found item happened to occurred
      in the very last line at the very end of the input string)
      >

      I wouldn't know, honestly, I just tested it and found out that there
      were some extra lines (I just trimmed those, as you noticed). And
      then I only tested twice with the three lines in the order Manuel
      provided us with, and once with the find-text on the first line (and
      this seemed to work).

      Maybe it has to do with the chopping itself - it could be that this
      takes place after the newline-character in the clip I sent in...
      Didn't have the time to find out.


      Thanks,

      Hugo
    • Alan C.
      Hi Manuel, Hugo, All, Thanks to you too for helping; the idea -- database principle (such clip idea follows). ... In all of this does exists idea for clip
      Message 2 of 19 , Feb 24 11:55 PM
      • 0 Attachment
        Hi Manuel, Hugo, All,

        Thanks to you too for helping; the idea -- database principle (such clip idea follows).

        >Hey¡¡¡ Fantastic!

        In all of this does exists idea for clip powered database too! ¡¡¡

        Jody probably already wrote one.

        What you were do is like a key to access a larger item, the larger item being a delimited item that is inside yet a larger item - a file amongst other delimited items (line or otherwise delimited). (one item relates to another item relates to yet another item = relational database principle).

        pc notetab editor clip utilities software ~ http://www.notetab.com/
        pc fookes ae mbg ezt pics graphic email ~ http://www.fookes.com/
        perl namespace scope functions import ~ http://perl.plover.com/FAQs/Namespaces.html
        computing kb it pc help knowledge base ~ http://kb.indiana.edu/index.cgi
        perl xml project perlxml xml and perl ~ http://www.perlxml.net/index.dkb
        alistapart css html xhtml web www ~ http://www.alistapart.com/index.html
        css position ~ http://users.rraz.net/mc_on_the_rocks/testpage/pie.html
        ftp gorilla cpan ualberta ~ ftp://sunsite.ualberta.ca/pub/Mirror/CPAN/
        sax perl perlsax xml ~ http://www.xml.com/pub/a/2001/02/14/perlsax.html
        ez ezfind google find easy ~ http://www.google.com/

        have a database (just a text) file. use a wizard (and/or a separate keyword doc) to search for keyword(s) that exist inside the main database. key(s) found near left side of line picks a line or picks however many lines that contain the criteria. Broaden or narrow the search by the amount of keywords entered into search criteria.

        Probably this is the best idea yet to befall onto me for that url database clip that I was going to write (started to write one once, using an ini file but never finished it) some things are good for keeping in ini, other things are best left to a line break delimited text file.

        But now I'm hooked on Perl. And new, though not total newbie, to xml. I near intermediate skills on Perl; the "Xml and Perl" book I just got is really taking off with me.

        Then there's Perl - MySql but that's down the road a ways, after I master some Perl with xml (the flexibility is rather amazing--store info/data in the xml -- transform xml to this, transform xml to that).

        --
        Alan.
      • Jody
        Hi Alan C., Manuel, Hugo, All, ... I don t really know what you are finding so I cannot tell if I did. Does Manuel mean to get all the lines that the string
        Message 3 of 19 , Feb 25 4:13 AM
        • 0 Attachment
          Hi Alan C., Manuel, Hugo, All,

          >Jody probably already wrote one.

          I don't really know what you are finding so I cannot tell if I
          did. Does Manuel mean to get all the lines that the string is
          found in? Manuel, your English is 10,000 times better than my
          Spanish, but I sometimes have a hard time understanding what you
          want.

          Anyway, I just wanted to cut in for a bit and let you all know I
          may be "out of it" for a day or two. I leave for Pensacola
          (about 20 miles) for a biopsy in my throat in a few minutes.
          I'll get back into it all when I feel up to it. Until then...

          Happy Clip'n!
          Jody

          http://www.notetab.net

          Subscribe, UnSubscribe, Options
          mailto:Ntb-Clips-Subscribe@yahoogroups.com
          mailto:Ntb-Clips-UnSubscribe@yahoogroups.com
          http://groups.yahoo.com/group/ntb-clips
        • Alan C.
          Hi Jody, Hope everything goes well. Here s wishing you best and hope you get well soon ... Yes. (what I meant) Not what Manuel sought; his string only to be in
          Message 4 of 19 , Feb 25 2:54 PM
          • 0 Attachment
            Hi Jody,

            Hope everything goes well. Here's wishing you best and hope you get well soon

            >>Jody probably already wrote one.
            >
            >I don't really know what you are finding so I cannot tell if I
            >did. Does Manuel mean to get all the lines that the string is
            >found in?

            Yes. (what I meant)

            Not what Manuel sought; his string only to be in one line so he get 1 line he up and running fine.

            1st quoted line above is mine; it's in reference to a clip that is/does any or some sort of keyword searchable database of delimited items

            I may write such a clip as (about it) follows. But I'd wondered if similar already written.

            math algebra multiplication division whatever else also in this line
            math geometry multiplication subtraction whatever else also in this line
            math trigonometry division whatever else also in this line

            above are three samples; each is a line delimited item of my data in a file.

            My key or keys so as to find an entire line (or lines) are the words near the left end of each line.

            If I do a find for geometry then that one entire line is retrieved.

            If I do a find for division then two lines are retrieved. math, 3 lines retrieved.

            If I find for these two words: multiplication subtraction

            that search retrieves two lines.

            get all the lines that the string is found in. Feature of keyword searchable using one or multiple keywords. The more keywords used in a search, the narrower the scope of the search and retrieval. Conversely, use less keywords for searching broadens the scope of the search and retrieval.

            --
            Alan.
          • Jody
            Hi Alan, This does all you wanted except going into find two words. Check out my Replace Library for a And, Or, but Not... Clip. See below.
            Message 5 of 19 , Feb 26 3:02 PM
            • 0 Attachment
              Hi Alan,

              This does all you wanted except going into find two words. Check
              out my Replace Library for a "And, Or, but Not..." Clip. See
              below.

              <--- Copy below this line --->
              H=Get Lines That Contain Search Criteria
              ; eMailed on 02-26-2003, Jody@...
              ; notetab.net, notetab.net/html/cd-info.htm

              ^!Jump 1
              ^!ClearVariable %List%
              :Loop
              ^!Find "^?[Find what=^&]" S
              ^!IfError Show
              ^!Jump Line_Start
              ^!Set %GetLine%=^$GetLine$
              ^!Append %List%=^%GetLine%^%nl%
              ^!Jump +1
              ^!Goto Loop

              :Show
              ^!Toolbar New Document
              ^%List%

              <--- Copy above this line --->
              <--- Right click over a Library --->
              <--- Choose: Add from Clipboard --->

              Working examples of using Find and Replace in Clips:
              http://www.notetab.net/zip/replace.zip

              >Hope everything goes well. Here's wishing you best and hope you get well soon
              >
              >>>Jody probably already wrote one.
              >>
              >> I don't really know what you are finding so I cannot tell if I
              >> did. Does Manuel mean to get all the lines that the string is
              >> found in?
              >
              >Yes. (what I meant)
              >
              >Not what Manuel sought; his string only to be in one line so he
              >get 1 line he up and running fine.
              >
              >1st quoted line above is mine; it's in reference to a clip that
              >is/does any or some sort of keyword searchable database of
              >delimited items
              >
              >I may write such a clip as (about it) follows. But I'd wondered
              >if similar already written.
              >
              >math algebra multiplication division whatever else also in this line
              >math geometry multiplication subtraction whatever else also in this line
              >math trigonometry division whatever else also in this line
              >If I do a find for division then two lines are retrieved. math, 3 lines retrieved.
              >
              >If I find for these two words: multiplication subtraction
              >
              >that search retrieves two lines.


              Happy Clip'n!
              Jody

              http://www.notetab.net

              Subscribe, UnSubscribe, Options
              mailto:Ntb-Clips-Subscribe@yahoogroups.com
              mailto:Ntb-Clips-UnSubscribe@yahoogroups.com
              http://groups.yahoo.com/group/ntb-clips
            • Alan C.
              Hi Jody, It work very fine. Thanks. But then I used it on a doc with some raather long lines and the ntp the word wrap was on. And it didn t work right,
              Message 6 of 19 , Feb 26 6:49 PM
              • 0 Attachment
                Hi Jody,

                It work very fine. Thanks. But then I used it on a doc with some raather long lines and the ntp the word wrap was on. And it didn't work right, kept loooping back until I ctrl + alt

                I turned off the wordwrap then it worked fine.

                I guess perhaps to check iswordwrap then turn off wordrap until end of clip then set wordwrap as it was before? I can handle that but thought i'd mention what happend in case someone else to try the clip.

                (nearly or off topic) if i get some xml data storage using perl to parse and/or display and/or create the xml with also interface to NoteTab, I'll share the clip portion, perl script, xml file of it on the Scripts list.

                Alan.

                >This does all you wanted except going into find two words. Check
                >out my Replace Library for a "And, Or, but Not..." Clip. See
                >below.
                >
                ><--- Copy below this line --->
                >H=Get Lines That Contain Search Criteria
                >; eMailed on 02-26-2003, Jody@...
                >; notetab.net, notetab.net/html/cd-info.htm
                <snipped>
                >><snipped>a clip that
                >>is/does any or some sort of keyword searchable database of
                >>delimited items
              • Jody
                Hi Alan C., ... If I mess with word wrap at all I just force it off and turn it on after the clip is done whether it was off or not. I use to do all the
                Message 7 of 19 , Feb 26 7:48 PM
                • 0 Attachment
                  Hi Alan C.,

                  >It work very fine. Thanks. But then I used it on a doc with
                  >some raather long lines and the ntp the word wrap was on. And it
                  >didn't work right, kept loooping back until I ctrl + alt
                  >
                  >I turned off the wordwrap then it worked fine.

                  If I mess with word wrap at all I just force it off and turn it
                  on after the clip is done whether it was off or not. <g> I use
                  to do all the checks and restore to original state, but I don't
                  waste my time with it anymore. ;) I think I have a tool that
                  adds the code with a click on my Clipbar that has common sets of
                  code that I use fairly often.

                  Happy Clip'n!
                  Jody

                  http://www.notetab.net

                  Subscribe, UnSubscribe, Options
                  mailto:Ntb-Clips-Subscribe@yahoogroups.com
                  mailto:Ntb-Clips-UnSubscribe@yahoogroups.com
                  http://groups.yahoo.com/group/ntb-clips
                Your message has been successfully submitted and would be delivered to recipients shortly.