Community
    • Login

    mark the lines that you have n characters

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    4 Posts 3 Posters 694 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.
    • VivianjenylordV
      Vivianjenylord
      last edited by

      friends how can I mark the lines that have 6 characters after the colon (:)

      c.pardi@inconu.com:abcdef
      emmanuel.brounidd7@fixe.com:12345daxs
      contact@jamaka.com:@23411
      dbpoloul@hik.com:aaasdfex
      michel.ours@yahoo.com:12qwas

      to

      c.pardi@inconu.com:abcdef
      contact@jamaka.com:@23411
      michel.ours@yahoo.com:12qwas

      Meta ChuhM 1 Reply Last reply Reply Quote 0
      • guy038G
        guy038
        last edited by guy038

        Hello, @Vivianjenylord and All,

        You said :

        friends how can I mark the lines that have 6 characters after the colon (:)

        I suppose that you meant :

        friends how can I mark and delete the lines that do not have exactly 6 characters after the colon (:) ;-))

        If so, from your original text :

        c.pardi@inconu.com:abcdef
        emmanuel.brounidd7@fixe.com:12345daxs
        contact@jamaka.com:@23411
        dbpoloul@hik.com:aaasdfex
        michel.ours@yahoo.com:12qwas
        
        • Open the Replace dialog ( Ctrl + H )

        • SEARCH (?-s)(?!.+:.{6}\R)^.+\R    OR     (?-s)^.+:(.{0,5}|.{7,})\R

        • REPLACE Leave EMPTY

        • Tick, preferably, the Wrap around option

        • Select the Regular expression search mode

        • Click, once, on the Replace All button or several times on the Replace button

        You should obtain your expected text :

        c.pardi@inconu.com:abcdef
        contact@jamaka.com:@23411
        michel.ours@yahoo.com:12qwas
        

        Notes :

        • The in-line modifier, (?-s), at the beginning of the two regexes, means that any further dot ( . ) represents a single standard character, only and not an EOL one !

        • The first syntax looks for a complete non-null line, with its EOL character(s) ( ^.+\R ), but ONLY IF the negative look-ahead ( (?!.+:.{6}\R) ) is satisfied, i.e. it does not exist a colon, after some chars, followed with, exactly, six standard characters, themselves followed with a line-break

        • The second syntax looks from a non-null range of standard characters, till a colon character, followed with a range of standard chars between 0 and 4 or from 7 and above

        Best Regards

        guy038

        VivianjenylordV 1 Reply Last reply Reply Quote 3
        • Meta ChuhM
          Meta Chuh moderator @Vivianjenylord
          last edited by Meta Chuh

          @Vivianjenylord @guy038 et al.

          this looks to me like a case, where it is wished to process (or remove) all user accounts, which do not match your password requirements.

          if this is the case, we would also need your specific needs and requirements for those user accounts, as well as how you would have thought to treat them, e.g. after marking.

          shall your passwords only be allowed to have 6 chars, or do you want to remove them as too short ?

          best regards.

          1 Reply Last reply Reply Quote 2
          • VivianjenylordV
            Vivianjenylord @guy038
            last edited by

            @guy038 so is friend, I help a lot the Regular expression, I thank you very much for your help

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