Community
    • Login

    Clear certain area

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    5 Posts 2 Posters 2.6k Views 2 Watching
    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.
    • Mic HaelM Offline
      Mic Hael
      last edited by

      Hello together, I have two strings in a file, there are only the letters and special characters to be deleted. The phone number must stop.

      *The bold can be deleted.

      =================================================
      Policy

      1 MB 491609xxxxxx Mustermann , Musterstraße Nr.34
      1029
      8
      1 MB 491609xxxxxx Mustermann , Musterstraße Nr.34
      1029
      4
      MATCH(“Calling-Station-Id=491609xxxxxx”)
      1029
      2
      125

      4546
      3
      4
      3
      3
      5
      10
      3
      9
      3
      7

      8
      3
      -1408154491

      7
      5
      2

      6
      3
      5

      How do I get the phone number and only the brads are deleted.

      Many Thanks
      greeting
      Michael

      Claudia FrankC 1 Reply Last reply Reply Quote 0
      • Claudia FrankC Offline
        Claudia Frank @Mic Hael
        last edited by

        @Mic-Hael

        don’t really get this.

        The phone number must stop.

        Maybe the phone number must stay (should not be deleted)?
        So from

        =================================================
        Policy

        1 MB 491609xxxxxx Mustermann , Musterstraße Nr.34
        1029
        8
        1 MB 491609xxxxxx Mustermann , Musterstraße Nr.34
        1029
        4

        to

        =================================================
        Policy

        491609xxxxxx
        1029
        8
        491609xxxxxx
        1029
        4

        ??

        Does the number always start with german country code and mobile 160 area code?
        If so, this could be used to create a regex something like

        find: ^.*(49160\d+).*$
        replace: \1
        

        Cheers
        Claudia

        1 Reply Last reply Reply Quote 0
        • Mic HaelM Offline
          Mic Hael
          last edited by

          Hello Claudia,
          the call number must stand still and the text may only be changed in the 2 marked lines.
          MATCH (“Calling-Station-Id = 491609xxxxxx”) must not be changed in any case !!!

          Thanks
          greeting
          Michael

          Claudia FrankC 1 Reply Last reply Reply Quote 0
          • Claudia FrankC Offline
            Claudia Frank @Mic Hael
            last edited by

            @Mic-Hael

            so something like

            if not Calling-Station-Id= before mobile number than replace?
            Is it always like that?

            Cheers
            Claudia

            Claudia FrankC 1 Reply Last reply Reply Quote 0
            • Claudia FrankC Offline
              Claudia Frank @Claudia Frank
              last edited by

              @Claudia-Frank

              or if there is always a space after the number but not in the case with the calling-station you could do

              find: ^.*(49160\d+)\s.*$
              replace: \1
              
              1 Reply Last reply Reply Quote 0

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better 💗

              Register Login
              • First post
                Last post
              The Community of users of the Notepad++ text editor.
              Powered by NodeBB | Contributors