Clear certain area
-
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.
=================================================
Policy1 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
1254546
3
4
3
3
5
10
3
9
3
78
3
-14081544917
5
26
3
5How do I get the phone number and only the brads are deleted.
Many Thanks
greeting
Michael -
don’t really get this.
The phone number must stop.
Maybe the phone number must stay (should not be deleted)?
So from=================================================
Policy1 MB 491609xxxxxx Mustermann , Musterstraße Nr.34
1029
8
1 MB 491609xxxxxx Mustermann , Musterstraße Nr.34
1029
4to
=================================================
Policy491609xxxxxx
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 likefind: ^.*(49160\d+).*$ replace: \1
Cheers
Claudia -
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 -
so something like
if not Calling-Station-Id= before mobile number than replace?
Is it always like that?Cheers
Claudia -
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