Community
    • Login

    In need of Searching a list in a file (Reg Expression) but can't seem to get it to work

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    6 Posts 5 Posters 452 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.
    • Steven BrewerS
      Steven Brewer
      last edited by

      I have a list open in a file. I need to find all of the items that have M in the 5th position. I have not been able to successfully create a regular expression to pull this off…

      Any ideas?

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

        @Steven-Brewer

        If you are talking about 5th position on a line then try:

        (?-s)^.{4}M

        1 Reply Last reply Reply Quote 2
        • Arlington 022A
          Arlington 022
          last edited by

          Alan, what are the first 5 characters mean in your Regex?

          1 Reply Last reply Reply Quote 0
          • PeterJonesP
            PeterJones
            last edited by

            The documentation for the Notepad++ regexes can be found at https://npp-user-manual.org/docs/searching/#regular-expressions

            In brief (?-s) turns off “. matches newline” for the regex, regardless of the setting of that checkbox. (That’s a very useful flag in a help forum like this, where you cannot know the settings of the user’s dialog box; by using that flag, you know the state of the regex, regardless of dialog settings.)

            Jay GrayJ 1 Reply Last reply Reply Quote 1
            • Jay GrayJ
              Jay Gray @PeterJones
              last edited by

              @PeterJones am getting a 404 for this: https://npp-user-manual.org/docs/searching/#regular-expressions is this a result of the attack, or just a typo?

              1 Reply Last reply Reply Quote 0
              • PeterJonesP
                PeterJones
                last edited by

                There were some server issues this weekend, but it’s working for me now. You might need to reload the page, and maybe even clear your browser cache and try again.

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