Community
    • Login

    Weird regex mode searching in normal search mode

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    7 Posts 3 Posters 822 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.
    • Alan KilbornA Online
      Alan Kilborn
      last edited by Alan Kilborn

      I can get Notepad++ into a state where it searches for a regular expression even when the Search mode is set for Normal. I can’t seem to get a reliable set of reproductions steps for it, though, so I was wondering if some others might try their hand at it and test if they can see the problem.

      I’m searching for \r as a literal – and yes, I have \ followed by r in the text of my file. What Notepad++ is doing is matching on each end-of-line, and not on the literal text \r.

      I thought it might be related to In selection searching, which I was doing at the time I first noticed it, and I also had the inspiration that it might be related to doing a regex search, then restarting N++, and then setting normal search mode before doing the very first search, but experimenting further with these features has not worked to reproduce the problem I’m seeing.

      If I’m in this funky “mode” and I change only the search text between \r and ., only the former causes this regex action in normal mode – searching for the . only finds literal periods, not “any char”.

      Notepad++ 8.1.9.3

      Alan KilbornA 1 Reply Last reply Reply Quote 2
      • Alan KilbornA Online
        Alan Kilborn
        last edited by

        I should also add that I’m mainly using Find Next functionality when this happens, although I just tried Find All in Current Document and it does the same (bad) thing.

        1 Reply Last reply Reply Quote 1
        • David RaynaD Offline
          David Rayna
          last edited by

          Not sure I can help, but …
          I see 3 search modes: Normal, Extended and Regular expression.
          If \r is matching with end-of-lines, then you could be in Extended mode which allows for some additional characters not in Normal mode (by using the \ prefix), but this is not Regex mode.

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

            @David-Rayna

            Thanks for your thoughts but I thought I made it clear that I was in Normal mode when this was happening.

            EkopalypseE 1 Reply Last reply Reply Quote 1
            • EkopalypseE Offline
              Ekopalypse @Alan Kilborn
              last edited by

              @alan-kilborn

              Could it be that you use “scripted” searches in between when this happens?

              Alan KilbornA 1 Reply Last reply Reply Quote 3
              • Alan KilbornA Online
                Alan Kilborn @Ekopalypse
                last edited by

                @ekopalypse said in Weird regex mode searching in normal search mode:

                Could it be that you use “scripted” searches in between when this happens?

                Sure I do. :-)
                Considering this now, I don’t see how the two things (interactive N++ searches vs. scripted searches) could interfere…do you have any ideas on that?

                EkopalypseE 1 Reply Last reply Reply Quote 1
                • EkopalypseE Offline
                  Ekopalypse @Alan Kilborn
                  last edited by

                  @alan-kilborn

                  the SCI_SETSEARCHFLAGS might be the culprit.
                  But I haven’t done any tests, I must say.

                  1 Reply Last reply Reply Quote 3

                  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