• Login
Community
  • Login

Remove Spaces if match with keywords

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
10 Posts 2 Posters 438 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.
  • R
    Rajesh T
    last edited by Oct 2, 2019, 2:12 AM

    Hi Team,

    Need your help to remove spaces based on keywords matching;

    Example:
    CAG000099 1ORCOMM
    CAG000099 1ORCOMM
    CAG000099 2ORCOMB
    CAG000099 3COMM
    CAG000099 1COMB

    If the above rows match with keyword COM,reduce the spaces(Currency 3spaces,i want only 1 space) in between above two words.

    Expected:
    CAG000099 1ORCOMM(3 Spaces)
    CAG000099 1ORCOMM(1 Space)

    Thank you in advance.

    1 Reply Last reply Reply Quote 0
    • R
      rinku singh
      last edited by Oct 2, 2019, 2:21 AM

      here is no Currency symbol instead
      hi rajesh you can speak hindi

      1 Reply Last reply Reply Quote 0
      • R
        rinku singh
        last edited by Oct 2, 2019, 2:24 AM

        @Rajesh-T said in Remove Spaces if match with keywords:

        between above two words.

        find 3 spaces in your name using rexex
        find what : Rajesh\s\s\sT

        1 Reply Last reply Reply Quote 0
        • R
          Rajesh T
          last edited by Oct 2, 2019, 3:07 AM

          Hi @gurikbal-singh ,

          No ,only english…Its currently typo mistake.

          I have 3 spaces in between CAG000099 and 1ORCOMM,
          Requied only 1 space between CAG000099 and 1ORCOMM,

          1 Reply Last reply Reply Quote 0
          • R
            rinku singh
            last edited by rinku singh Oct 2, 2019, 3:42 AM Oct 2, 2019, 3:40 AM

            @Rajesh-T said in Remove Spaces if match with keywords:

            CAG000099 and 1ORCOMM

            find what :CAG000099\s\s\s1ORCOMM
            replace with :CAG000099\s1ORCOMM

            using regex

            1 Reply Last reply Reply Quote 0
            • R
              Rajesh T
              last edited by Oct 2, 2019, 4:01 AM

              hi @gurikbal-singh

              1ORCOMM can be change in few lines,either it will be 1 COMM or 2 COMM or 2ORCOMM but COM is common in all keywords.
              How we handle in this case?

              1 Reply Last reply Reply Quote 0
              • R
                rinku singh
                last edited by rinku singh Oct 2, 2019, 4:31 AM Oct 2, 2019, 4:29 AM

                @gurikbal-singh said in Remove Spaces if match with keywords:

                where in example every line starts with CAG000099

                find what :^CAG000099\s\s\s
                replace with :^CAG000099\s

                1 Reply Last reply Reply Quote 0
                • R
                  Rajesh T
                  last edited by Oct 2, 2019, 7:00 AM

                  hi @gurikbal-singh

                  Its exactly looks like below

                  AG00001FF363611113636111010103G16CAF000011 1ORCOMM

                  AG00286FF004409580044095010100C17AAF002800 2COMB
                  AG00286FF004372480043724010100C17AAF002800 2COMVC2

                  1 Reply Last reply Reply Quote 0
                  • R
                    rinku singh
                    last edited by Oct 2, 2019, 7:07 AM

                    replace \s\s\s with \s

                    1 Reply Last reply Reply Quote 0
                    • R
                      Rajesh T
                      last edited by Oct 3, 2019, 1:40 AM

                      Thank you @gurikbal-singh .
                      The information you provided matches few conditions.

                      1 Reply Last reply Reply Quote 0
                      3 out of 10
                      • First post
                        3/10
                        Last post
                      The Community of users of the Notepad++ text editor.
                      Powered by NodeBB | Contributors