Navigation

    Community

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

    Finding strings that start in a specific column

    General Discussion
    2
    5
    63
    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.
    • e5584071
      e5584071 last edited by

      Can anyone please advise how to search for character strings that start in a specific column?

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

        @e5584071

        Well you aren’t very specific, but maybe this can get you started:

        Find: (?-s)^.{3}\K.
        Search mode: regular expression

        This will find a single character beginning in column 4 of every line that has 4 or more characters.

        Yep, I realize that there is going to be more to your statement-of-problem after you read this response.

        e5584071 1 Reply Last reply Reply Quote 3
        • e5584071
          e5584071 @Alan Kilborn last edited by

          @alan-kilborn , can you please explain the syntax of this statement? I don’t see anything that specifies column 4. Thanks very much.

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

            @e5584071 said in Finding strings that start in a specific column:

            I don’t see anything that specifies column 4.

            It’s related to the 3 (one less than 4).
            The syntax is saying skip the first 3 characters on a line and match on something starting in column 4.
            Exact syntax can be looked up in the user manual.

            e5584071 1 Reply Last reply Reply Quote 2
            • e5584071
              e5584071 @Alan Kilborn last edited by

              @alan-kilborn , thanks very much. This is exactly what I needed. Have a great day!

              1 Reply Last reply Reply Quote 1
              • First post
                Last post
              Copyright © 2014 NodeBB Forums | Contributors