Community
    • Login

    Search a textfile

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    5 Posts 4 Posters 2.4k Views 1 Watching
    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.
    • Mårten AxelssonM Offline
      Mårten Axelsson
      last edited by

      Hello!
      Im sure this question is answerd somewhere in this forum but i dont know what to look for.

      I have a text file that i want to search in. I want notepad++ to display all results containing this for example:

      If i search for c*r notepad++ should display results like: car, cob, cer etc.

      Anyone can help me with this? :)

      Have a nice day

      NippurDeLagashN 1 Reply Last reply Reply Quote 0
      • gerdb42G Offline
        gerdb42
        last edited by

        Search for “Regular Expression” or “RegEx”. You will find lots of information in this Forum.
        You may also want to look at http://www.boost.org/doc/libs/1_65_1/libs/regex/doc/html/boost_regex/syntax.html for RegEx syntax.

        1 Reply Last reply Reply Quote 0
        • NippurDeLagashN Offline
          NippurDeLagash @Mårten Axelsson
          last edited by

          @Mårten-Axelsson

          In the “Find” dialog there is “Search Mode” group box. Just select the option labeled “Regular expression”.

          You can find explanations about regular expressions here:

          http://www.regular-expressions.info/tutorial.html

          1 Reply Last reply Reply Quote 0
          • Meta ChuhM Offline
            Meta Chuh moderator
            last edited by

            @Mårten-Axelsson

            solution:
            make a regex search for c(.?)r
            this will find and highlight the whole search string, if it is beginning with c, ending with r, and having any single character in between

            if you want to search for anything beginning with c, ending with r, but having an unknown ammount of characters or spaces in between, use c(.*?)r

            1 Reply Last reply Reply Quote 0
            • Mårten AxelssonM Offline
              Mårten Axelsson
              last edited by

              Thanks alot guys! =)

              1 Reply Last reply Reply Quote 0

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better 💗

              Register Login
              • First post
                Last post
              The Community of users of the Notepad++ text editor.
              Powered by NodeBB | Contributors