Community discussions

MikroTik App
 
runbound
Member Candidate
Member Candidate
Topic Author
Posts: 125
Joined: Fri Apr 19, 2013 9:28 am

remove inbox from a to z

Thu Jun 30, 2022 2:52 am

how to remove this in sms inbox from a-z

when you receive a message from the telco that instead of a phone number it appears like this with matching lowercase and uppercase
:if ([/tool sms inbox find where phone~"AAbb" or phone~"cBBB" or phone~"AABB" or phone~"ABAB" or phone~"ACAC"]) do={
:log warning message=("removing sms error ref101")
/tool sms inbox remove $i;
/tool sms inbox remove $i;
}
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11967
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: remove inbox from a to z

Thu Jun 30, 2022 3:41 am

Congratulations: Well-detailed use cases...

Why remove the same two times?
You at least have read what you post?
Or copy-paste from other source?

Why not simply this??? (remove when at least one non numeric (except +) character is present)
/tool sms inbox remove [find where !(phone~"^[+0-9]+\$")]
 
runbound
Member Candidate
Member Candidate
Topic Author
Posts: 125
Joined: Fri Apr 19, 2013 9:28 am

Re: remove inbox from a to z

Thu Jun 30, 2022 3:59 pm

not working sir
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11967
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: remove inbox from a to z

Thu Jun 30, 2022 5:20 pm

I do not have any sms with text inside name for test, retry again with the string on previous post

Who is online

Users browsing this forum: diamuxin and 25 guests