Community
    • Login

    Searching and Marking

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    7 Posts 2 Posters 403 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Sherry PorrasS
      Sherry Porras
      last edited by

      Fellow Notepad++ Users,

      Could you please help me the the following search-and-mark problem I am having?

      I generally use Notepad as a text editor for coldfusion and oracle sql code. What I’m wanting to do is find all the columns in a document which are referenced by the column alias such as “a.bfy” for the table “faos a”. I want to mark those instances and copy the marked text…if that’s possible.

      Here is the data I currently have (“before” data):

      Select a.*
      from faos a
      where ......
      * represents to me a wildcard, which could mean any column in the table such as "a.bfy", "a.fund_cd", 
      

      I have done a few searches for an example and looked at the manual, but it is so freaking confusing and I don’t understand it.

      Thanks so much for any help.

      Alan KilbornA 1 Reply Last reply Reply Quote 1
      • Alan KilbornA
        Alan Kilborn @Sherry Porras
        last edited by

        @Sherry-Porras said in Searching and Marking:


        It sounds like your problem is a SQL one, and not a Notepad++ one??


        and looked at the manual, but it is so freaking confusing and I don’t understand it.

        The Notepad++ manual?
        If so then :-( because the manual is very good and getting better all the time.

        Sherry PorrasS 1 Reply Last reply Reply Quote 1
        • Sherry PorrasS
          Sherry Porras @Alan Kilborn
          last edited by

          @Alan-Kilborn I’m trying to go thru some sql code and mark these instances to copy to another document to reference table columns that are being used in our application. So far I haven’t been successful in using Notepad’s search feature. I don’t think it’s a sql problem, but a problem with understanding the search syntax.

          Alan KilbornA 1 Reply Last reply Reply Quote 1
          • Alan KilbornA
            Alan Kilborn @Sherry Porras
            last edited by Alan Kilborn

            @Sherry-Porras

            Ah, I see it now; sorry.

            How about searching in Regular expression search mode for a\.(bfy|func_cd)?

            Maybe add a \b at the start so that you don’t match aa.bfy or testa.func_cd?
            So: \ba\.(bfy|func_cd)

            Or even another \b at the end for a similar reason?

            Sherry PorrasS 1 Reply Last reply Reply Quote 0
            • Sherry PorrasS
              Sherry Porras @Alan Kilborn
              last edited by

              @Alan-Kilborn Thank you that worked somewhat, I need the portion between ( ) to reference any column that might be contained in that code. That would be where the wildcard comes in. The table could have anywhere from 2 to 100 different columns.

              Alan KilbornA 1 Reply Last reply Reply Quote 0
              • Alan KilbornA
                Alan Kilborn @Sherry Porras
                last edited by

                @Sherry-Porras said in Searching and Marking:

                wildcard

                Well you have to define to yourself and to us what that “wildcard” is.
                If it is just “word characters” (a-z, 0-9, and underscore) then you can use \w+ in the expression for it, possibly:

                a\.\w+

                There’s great stuff in the user manual section for it on this, BTW. :-)
                Also, HERE.

                Sherry PorrasS 1 Reply Last reply Reply Quote 0
                • Sherry PorrasS
                  Sherry Porras @Alan Kilborn
                  last edited by

                  @Alan-Kilborn Thank you, thank you that worked. I’ve been looking at https://npp-user-manual.org/docs/searching/#regular-expressions and found only one mention of using “w+” , like I said all the information is confusing and probably 98% of it I’ll never need or use, but I will make note of the links. Thank you for your assistance I so appreciate it.

                  1 Reply Last reply Reply Quote 1
                  • First post
                    Last post
                  The Community of users of the Notepad++ text editor.
                  Powered by NodeBB | Contributors