Patterns.Phone Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
This pattern is intended for searching for things that look like they might be phone numbers in arbitrary text, not for validating whether something is in fact a phone number.
[Android.Runtime.Register("PHONE")]
public static Java.Util.Regex.Pattern? Phone { get; }
[<Android.Runtime.Register("PHONE")>]
static member Phone : Java.Util.Regex.Pattern
Property Value
- Attributes
Remarks
This pattern is intended for searching for things that look like they might be phone numbers in arbitrary text, not for validating whether something is in fact a phone number. It will miss many things that are legitimate phone numbers.
The pattern matches the following: <ul> <li>Optionally, a + sign followed immediately by one or more digits. Spaces, dots, or dashes may follow. <li>Optionally, sets of digits in parentheses, separated by spaces, dots, or dashes. <li>A string starting and ending with a digit, containing digits, spaces, dots, and/or dashes. </ul>
Java documentation for android.util.Patterns.PHONE
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.