jrgong
(jrgong)
4 أغسطس 2020، 12:24م
1
What would you like done?
Hey guys
Since we run our forum on an anonymous basis, we would like to protect our members’ privacy.
For such we would like to implement a data explorer query that warns moderators whenever a private message is send containing a phone number .
There was a great template from @SidV for a data explorer query here:
https://github.com/SidVal/discourse-data-explorer/blob/queries/queries/search-term-pm.sql
When do you need it done?
August 15
What is your budget, in $ USD that you can offer for this task?
50 USD
إعجاب واحد (1)
pfaffman
(Jay Pfaffman)
4 أغسطس 2020، 2:17م
2
What do you think a phone number looks like?
إعجاب واحد (1)
jrgong
(jrgong)
4 أغسطس 2020، 2:28م
5
Basically any longer number (more than 9 digits) that starts with +49 or 0…
Any special characters in between the digits should be ignored
إعجاب واحد (1)
pfaffman
(Jay Pfaffman)
4 أغسطس 2020، 2:53م
6
jrgong:
Basically
To solve your problem I need an exact answer to what you think a phone number is, not “basically”. Solving it “basically” is a $500-$5000 problem.
So anything that starts with “+49” and then has 10 or more digits, and ~!@#$%^&*()
can be interspersed in those 10 or more digits, but not counted?
3 إعجابات
Pretty sure this can already be done with Admin, Logs, Watched Words in regex mode. You will need to be very very careful in how you construct that regex.
5 إعجابات
pfaffman
(Jay Pfaffman)
5 أغسطس 2020، 12:58ص
8
That was going to be part of my solution, though as you suggest, just how to define what is a phone number is far from a simple task.
إعجابَين (2)
jrgong
(jrgong)
5 أغسطس 2020، 8:52ص
9
Thx for the input.
We will try it this way
Topic can be closed
إعجابَين (2)
neounix
(Dark Matter)
5 أغسطس 2020، 8:58ص
10
Here is one example REGEX for matching phone numbers:
^[+]*[(]{0,1}[0-9]{1,4}[)]{0,1}[-\s\./0-9]*$
Here is another one:
^(\+\d{1,2}\s)?\(?\d{3}\)?[\s.-]\d{3}[\s.-]\d{4}$
Modify as you wish… You can test with an online REGEX tester, there are many.
HTH
3 إعجابات
jrgong
(jrgong)
5 أغسطس 2020، 9:02ص
11
Wow, I appreciate it, thx!
We will test it
إعجاب واحد (1)
neounix
(Dark Matter)
5 أغسطس 2020، 9:03ص
12
Welcome! @jrgong
Here is a sample online REGEX tester for one of those examples:
https://regexr.com/3c53v
You can use that site, or a similar one, to test the number formats you are interested in.
إعجابَين (2)
jrgong
(jrgong)
5 أغسطس 2020، 11:47ص
13
Thx
Just one quick question: How can I set up the regex to ignore numbers with 8 digits or less?
إعجاب واحد (1)
system
(system)
تم إغلاقه في
4 سبتمبر 2020، 11:47ص
14
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.