Find user from mongo DB using phone number #2350
Unanswered
codydev-git
asked this question in
Q&A
Replies: 4 comments
-
in this situation, regex is your friend. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Could you please make a sample? |
Beta Was this translation helpful? Give feedback.
0 replies
-
If your format is like "1324654897" that. You can simply use this regex : .*\S\d |
Beta Was this translation helpful? Give feedback.
0 replies
-
In the database, a user's phone number is "+1 (324) 654-7890" |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
How are you?
I hope you are doing great.
I need a function to find a user from the database using a phone number.
But in the database, the user's phone number has many formats
+1 (1234) 123-1234
1234567890
(1234) 124 1234
+1234567890
+1 234 567 9012
really many formats...
.....
In this case, How can I find a user with this format "1234567890" phone number?
Thank you
Beta Was this translation helpful? Give feedback.
All reactions