Navigation

    Community

    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

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

    Help wanted · · · – – – · · ·
    5
    6
    104
    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 Brewer
      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 Kilborn 1 Reply Last reply Reply Quote 0
      • Alan Kilborn
        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 022
          Arlington 022 last edited by

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

          1 Reply Last reply Reply Quote 0
          • PeterJones
            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 Gray 1 Reply Last reply Reply Quote 1
            • Jay Gray
              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
              • PeterJones
                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
                Copyright © 2014 NodeBB Forums | Contributors