01/10/2018, 14:25
Format phone number
Cho mình hỏi chút:
Trong java có pattern nào để check vụ số điện thoại ko mọi người.
Hai dạng format này nè: (+84) 96 252 236 và (+84) 96 2 522 360.
Mong mọi người giúp đỡ!
Bài liên quan
Số điện thoại của bạn có dấu cách không?
Nếu không có dấu cách thì thử cái này xem
Online regex tester and debugger: PHP, PCRE, Python, Golang and JavaScript
Regex101 allows you to create, debug, test and have your expressions explained for PHP, PCRE, Python, Golang and JavaScript. The website also features a community where you can share useful expressions.
Có dấu cách ngăn ở giữa bạn à.
Ok cảm ơn bạn. Để mình tham khảo code.
Tham khảo
GitHub
googlei18n/libphonenumber
libphonenumber - Google's common Java, C++ and JavaScript library for parsing, formatting, and validating international phone numbers.
Cảm ơn bạn đã chia sẻ.