phone-number

Regex for NANP phone number with non-repeating last 7 digits

折月煮酒 提交于 2019-12-13 06:58:24
问题 I have to validate a 10 digit (US) phone number in the NANP format (no special characters allowed) in .NET and also check to make sure the last 7 digits of the phone number are non-repeating. So far, I have written the following regex to validate the NANP format ^(?:[2-9][0-8][0-9])([2-9][0-9]{2}[0-9]{4})$ How do I modify this regex to also account for non-repeating last 7 digits? Please note that using two regexes is not an option due to constraints of existing code. Edit: I have to check

Exporting SQL data to Excel without losing the 0 in the phone number

 ̄綄美尐妖づ 提交于 2019-12-13 06:08:22
问题 I currently have a simple database which stores a customers basic table. However when ever I try to export my sql query to Excel the phone number field always appears without a 0. My SQL query results: ID | Name |Address |DOB | Gender |Phone_Number | --------------------------------------------------------- 01 | Max |Abc Road| 2000-12-19 | Male |07777 893 8902 | 02 | Sam |TBH Road| null | Male |077778938902 | 03 | Doe |Dr Road| 1999-11-13 | Male |077778 938902 | What I get in Excel: ID | Name

How can I compare international phone numbers in Perl?

流过昼夜 提交于 2019-12-13 02:15:28
问题 Are there any modules that can help me compare phone numbers for equality? For example, the following three numbers are equivalent (when dialling from the UK) +44 (0)181 1234123 00441811234123 0181 1234123 Is there a perl module that can tell me this? 回答1: The closest I can see on CPAN is Number::Phone which is an active project, and supports UK Phone numbers. It should work for the specific example you give. A few countries are supported. If you've got phone numbers for other countries

Access user's phone number on iOS 7

北城以北 提交于 2019-12-12 20:12:22
问题 I know that iOS 4 and 5 do not allow the access of a user's phone number since its outside the sandbox of an application (if it needs to be accepted by apple). I would like to know whether this has changed in iOS 7 - with permissions whether it can be accessed etc. Thanks in advance. 回答1: No. Apple APIs do not provide access to this information. What's more, attempting to get this information without asking the user is generally considered a huge breach of privacy. 回答2: "For security reasons,

I am not getting the outgoing call phone number? both in emulator and real phone also getting null

懵懂的女人 提交于 2019-12-12 10:15:43
问题 call.java: public class Call extends Activity{ boolean timerhasstarted; Intent callIntent; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); call(); } void call() { String num="7829893070"; callIntent=new Intent(Intent.ACTION_CALL); callIntent.setData(Uri.parse("tel:"+num)); if(!timerhasstarted) { startActivity(callIntent); ct.start(); timerhasstarted=true; } else { ct.cancel(); timerhasstarted=false; Toast.makeText

Phone Mask in ASP.Net

落爺英雄遲暮 提交于 2019-12-12 03:18:41
问题 i am doing a ASP.Net application and I need to use phone mask input in a TextBox. I am using jQuery and it is not working. Asp.net: <asp:TextBox runat="server" ID="txtCelular" CssClass="w240 placeholder"></asp:TextBox> javascript: <script src="\scripts\jquery-1.7.2.js" type="text/javascript"></script> <script type="text/javascript"> $("#txtCelular").mask("(999) 9999-9999?9"); $("#txtCelular").on("blur", function () { var last = $(this).val().substr($(this).val().indexOf("-") + 1); if (last

How to make a link clickable in a Google Map Marker InfoWindowAdapter

妖精的绣舞 提交于 2019-12-12 03:08:10
问题 I'm displaying a couple of markers on a Google Map. When I click on a marker it opens a custom InfoWindowAdapter this.map.setInfoWindowAdapter(new CustomInfoWindowAdapter(getLayoutInflater())); In this CustomInfoWindowAdapter I display some text and create a link when a phone number is found: @Override public View getInfoContents(Marker marker) { if (this.popup == null) { this.popup = inflater.inflate(R.layout.poi_marker, null); } TextView tv = (TextView) popup.findViewById(R.id.title); tv

Validation for textbox with two sets of phone numbers

℡╲_俬逩灬. 提交于 2019-12-11 17:12:49
问题 I am trying to do a validation on a textbox that can allow the input of one or more phone number in a single textbox. What I am trying to do is to send an message to the phone numbers included in the textbox. I have no problem when I enter just one set of number into the textbox and the message can be sent. However, whenever I type two sets of digit into the same textbox, my validation error will appear. I am using user controls and putting the user control in a listview. Here are my codes:

How to query ContactsContract.CommonDataKinds.Phone on Android?

好久不见. 提交于 2019-12-11 07:25:25
问题 I'm trying to build a conversation list for SMS messages. Therefore I'm reading "content://sms/conversations" and read the first few messages of each conversation to find the communication partners' phone numbers. With these numbers I try to retrieve the contact_id from ContactsContract.CommonDataKinds.Phone to fetch the rest of the person's information from the contacts database. String[] returnVals = new String[] {ContactsContract.CommonDataKinds.Phone.CONTACT_ID}; Cursor pCur = thisContent

Phone number format javascript

泄露秘密 提交于 2019-12-11 06:30:35
问题 I'm trying to format some phone numbers with regexp. The phone numbers i have stored are of diffrent length and all phone numbers have their country codes. Lets say a number looks like this: 00460708186681. I want that one to be formatted as: +46 (0)708-18 66 81. The first three groups are easy: /00([\d]{2})([\d]{1})([\d]{3})/ Because the beginning of the number will always be the same. It's the last part where i dont know the length of the remaining chars (and i want them to be divided into