Generic funtction  return  format string Phone Number

Hi
I tried , tried but nothing
I need build a Generic Function formating phone number, passing Type Telephone (Res,Cml,Cel...etc wiht 3 letters ) , Prefix can to have 3 or 4 digits and Sufix wih 4 digits
How Can I to do It ?
where can I to find tutorial about Regular Expression
thank

Asking the same question again?
Re: Function that to Format
Look in the documentation for regular expressions (it's not difficult to search you know!)
http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14251/adfns_regexp.htm#ADFNS1003

Similar Messages

  • Format a Phone number using StringFormat in xaml

    Hello,
    I am looking to format a Phone Number in xaml. The Phone Number comes as a string to me.
    <Label Content="{Binding SelectedPatientPolicy.CarrierPhoneNumber}" Grid.Row="5" Grid.Column="1" Grid.ColumnSpan="2" Style="{StaticResource FieldValueStyle}"/>
    Here I want to apply StringFormat as "(###) ###-####".
    Please let me know how can i achieve this.
    Thanks,
    Abdi

    You cannot apply a StringFormat on a string value in XAML. But you could use a converter class:
    namespace WpfApplication24_4
    public class StringToPhoneConverter : IValueConverter
    public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
    string s = value as string;
    if (string.IsNullOrEmpty(s) || s.Length < 10)
    return value;
    return string.Format("({0}) {1}-{2}", s.Substring(0,3), s.Substring(3,3), s.Substring(6,4)); //"(###) ###-####".
    public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
    throw new NotImplementedException();
    <Window x:Class="WpfApplication24_4.Window5"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:WpfApplication24_4"
    Title="Window5" Height="300" Width="300">
    <Window.Resources>
    <local:StringToPhoneConverter x:Key="conv"/>
    </Window.Resources>
    <Grid>
    <Label Content="{Binding SelectedPatientPolicy.CarrierPhoneNumber, Converter={StaticResource conv}}" Grid.Row="5" Grid.Column="1" Grid.ColumnSpan="2" Style="{StaticResource FieldValueStyle}"/>
    </Grid>
    </Window>
    The other option is to format the value of the source property directly. You cannot do this in the XAML markup anyway.
    Please remember to close your threads by marking helpful posts as answer and please start a new thread if you have a new question.

  • Formating a phone number based on locale

    How can I format a phone number based on the region setting? E.g. phone numbers will be formated as (xxx) xxx-xxxx if the region is set to US. And formatted otherwise if the region is set to some other country.

    also want to know

  • E72 - How to format the phone number on contact

    I can't figure out a easy for formatting my contact number to be like (xxx) xxx-xxxx or xxx-xxx-xxxx on e72 instead going to outlook make the changes and re-sync again. I find xxxxxxxxxx hard to read. I thought I found out how to add hypen "ctrl+(" but that basically long dash rather than short dash which you get an error if you try to send message with the phone number having the long dash. It is fine when you call. It is smart enough to strip out non-numerical value. But it is sms is not smart enough to remove it.

    ozidug wrote:
    The sad thing is that there is an international standard for phone numbers (+xxx) xxx-xxxx which everyone ought to recognise and use. It allows localisation and shortened dialling, but Nokia just want a number string. It's just lazy on thepart of the programmers; since it's a standard, they should have developed the program code once and just inserted it into every phone they produce, and that's not hard.
    A poor reflection on Nokia, I'm sad to say.
    AFAIK the international standard for telephone numbers (E.164) does not say anything about using spaces, dashes, or brackets in a telephone number.
    This may of course make it more "human readable", but claiming that what you want is a standard doesn't make it a standard, and I don't think Nokia (or any other phone manufacturer) should/could implement every single user-specific wish...

  • Why does iCal insist on formatting a phone number as a hyperlink? How can I prevent this, and prevent iCal from launching FaceTime in response to entering the phone number in the event box?

    I just want to enter a phone number into an event in iCal. I do not want to launch FaceTime. How can I just put a phone number in an iCal event, without OSX 10.10 insisting on launching FaceTime in response to entering the phone number? I use a Macbook Pro.

    Megantic wrote:
    Ever since I upgraded my iPhone 4S to iOS7, it has basically become a brick.  It constantly freezes, and the home button becomes completely inoperable.  People have suggested a number of fixes for the home button problem ("calibrating", tightening screws, etc.) but none of the fixes solved the problem.  Through trial and error, I've come to realize that the problem is that the phone doesn't have enough computing power and that too much of its RAM gets used up by background processes, causing the phone to freeze.
    I have found an app that stops unnecessary background processes currently running, frees up RAM, and lets the phone function properly (Free RAM 1.3). Once I've run this app, the phone functions perfectly.
    However, this clean up only happens each time the app is launched (ie: it does not continuously free up RAM).  So, I constantly have to run it (and sometimes am not able to because the phone is frozen and the home button won't work).
    When it is running, the app  displays the background processes that are running.  Looking at the list, there are many processes for which I have no need, such as processes related to automatic checking for app updates, processes related to iCloud (which I do not use), etc.  Preventing these processes from running in the first place would go a long way in making my phone more useable (being able to return to a previous iOS would be a better option, but Apple won't allow this).
    Here is my question:  is there a way to prevent unnecessary background processes from running at all?
    Which app is this?

  • Ringtone format & Contact phone number transfer from another phone

    Two questions for one of the experts.
    What format are Iphone ringtones? Can you use songs previously purchased and converted to the proper format be used as a ring tone and how would someone perform this action.
    Is it possible to "bluetooth" phone number from old cell phone to the Iphone?

    What format are Iphone ringtones? Can you use songs previously purchased and converted to the proper format be used as a ring tone and how would someone perform this action.
    M4r - which is MP4 and no - not without a hack.
    Is it possible to "bluetooth" phone number from old cell phone to the Iphone?
    No - the iPhone does not support Bluetooth data transfer. All data syncing is done with a USB connection with your computer via iTunes.

  • Generic phone number in contact data

    Hello,
    I use a iPhone with lates iOS (7.1.2).
    Sometimes I get e.g. a call from a company employee which is not in my contact list. Now, I, want to create a 'generic contact' with the Company phone number but without the Extension. Instead of the Extension number I like to write a '*'. With this I would see at least which Company is calling me, even I don't saved the actual Extension number in my contacts.
    Is this already possible? I tried, but I don't found the way.
    If it's not possible, where to send a feature request? I think this feature would be helpfull for many people and you can extend the scenario also to just a city prefix and so on. The in the contacts saved number which match best, should be shown as caller.
    Eddy

    Hi Dipkumar,
    I think there is no call target in particular compaign. However if there is then I think it will dial the phone 2 by default.
    PDI helpdesk told me that I have to use skip next to dial then second number.
    BR
    Appreciate your response

  • Custom field to format phone number?

    Is it possible to create a custom field for a list item to format a phone number (e.g. take 555-555-5555 and format it to (555) 555-5555)?  Does anyone have any examples?

    Hi,
    If you want to format the phone number to (555)555-5555, you can create a calculated column base on the phone number column and set its formula as” ="("&REPLACE([phone number],4,1,")")” .
    For more information about formula, please refer to: http://office.microsoft.com/en-us/sharepointtechnology/CH100650061033.aspx
    Hope it can help you.
    Xue-Mei Chang

  • Phone number display format

    We are looking for a way to personalize the display format of phone number.
    I am at a company where there is a SAPphone or alike software connection to auto-dail using the SAP screen. Other then most companies here this is done from ECC rather then from CRM.
    For this, the Phone numbers are stored flat, without spaces, hashes and the like.
    In SAP there are setting for how to display date and numbers. I did not yet find a way to do the same with phonenumbers. There is an international requirement on how to display the numbers, and storing these numbers formatted is in my opinion not the preferred way to do it.
    There are function modules to format the numbers from flat stored numbers, but that will mean cloning standard transactions to Z versions so that the FM can be used. I would rather not do this too.
    Anyone any ideas?

    I am having the same issue with My Treo 700.  Did anyone find a resolution to this problem.  I think it is more than annoying.  For no reason the formatting just changed. 
    Thanks for you help.

  • Phone number formatting using personalization

    Hi,
    Is there any way that i can format the phone number in forms using personalization so that the user should only enter the phone number in 999-999-9999(only numbers) format or else it should throw an exception.
    Thanks in advance.
    PK

    Are you talking about the D2K forms or self service pages?
    --Shiv                                                                                                                                                                                           

  • Import phone number

    Dear community,
    I am trying to import data regarding account and lead and I have some problems regarding phone number format. Although in the csv file I formatted the phone number based on the documentation +country code followed by space but after the import process all the phone numbers have a prefixed like 011.
    Could anyone to provide a solution workaround for this issue?
    Thank in advance,
    Cristian

    Based on the selected Country the following is the correct format for importing phone numbers:
    Non-US & Canadian Phone Format (+33 01 40359564)
    US & Canadian Phone Format
    408-555-1234
    (408) 555-1234

  • Is there any way to turn off Contacts' automatical formating of phone numbers?

    Address Book's telephone fields used to be free text. You could format the phone number as desired and add comments if needed. Contacts automatically format phone number according to the ten-digit phone number (area code plus 7 digit number). If the content of a phone field does not conform to this format, the contents are all pushed together, removing any spaces that you may have entered.
    In many countries that required formating is inappropriate. Besides, it limits your freedom to add important details, like "Do not call after 7PM," etc.
    There seems no way to turn this automatical formating.

    The format for South African numbers is wrong!
    Contacts uses: +27 (xx) yyyyyyy
    Firstly the dialing code is no longer optional (for at least five years) so the brackets make no sense. Also, almost everyone uses the grouping of 3 digits then 4 digits - including official phone books.
    Its should be +27 xx yyy zzzz
    (I would also like the the auto-formatting to be optional as some other countries are crazy too).
    Is posting something here enough to get the attention of developers?

  • Registration says "invalid local phone number" after OS 10.3x restore

    I have an old PowerBook G4 that's still in great shape and I wanted to restore it for some limited usage. The restore went without a hitch, but now OS X is prompting me to register the computer. When I enter my phone number, I get this pop-up window:
    "The local phone number you entered is not valid.
    Exchange number must be greater than 200, and cannot be 411, 611 or 911."
    Any thoughts on this? I really don't need to register this computer as it will mainly be used for internet browsing.
    I've already got an Apple ID for my newer Macs.
    Any help to either bypass registration or correctly formatting the phone number would be appreciated, thanks!

    command-Q gets you off the registration screen.

  • Why does the "Format & Strip" function not return a number in the same format as "Format String"?

    I am using the "Format and String" function in a vi with the "string" input wired to a string of type "0.9998,0.9899,1.0003,0.9995, (etc)". I have wired the "format string" input to a string constant "%1.4f". Irrespective of the format string, I always get a number out that is rounded to 2 decimal places. I have tried different number formats in the format string, and I have wired a 4d.p. floating point number to "default". I have also set the precision of the format string to 4 d.p. with no effect. Any suggestions (or is the output always rounded to 2 d.p.)?

    Hi,
    If you are looking at the result in a numeric indicator, then the default setting is 2 places of decimal, that is displayed.
    You need to right click on the indicator and select Format & Precision then change the Digits of Precision value.
    Ray.
    Regards
    Ray Farmer

  • How to create an item Phone Number of US Format

    Hi,
    Need to create an item in a page Phone Number.
    The Item should accept only US Phone Number Format.
    Need Suggestions.
    Regards,
    Krishna

    Hi Krishna,
    You can make the US Phone format validation in the Page controller by making a validation function and call this validation function on the submit button or form submission. u can use the following function in the page controller-
    public void validatePhone(String sPhoneNumber )
    Pattern pattern = Pattern.compile("\\d{3}-\\d{3}-\\d{4}");
    Matcher matcher = pattern.matcher(sPhoneNumber);
    if (matcher.matches()) {
    throw new OAException("Phone Number Valid", OAException.INFORMATION);
    else
    throw new OAException("Phone Number must be in the form XXX-XXX-XXXX", OAException.INFORMATION);
    and call the validation function in processFormRequest function
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processFormRequest(pageContext, webBean);
    OAMessageTextInputBean msgInBean =(OAMessageTextInputBean)webBean.findIndexedChildRecursive("<id of the element>");
    if ((pageContext.getParameter("<submit button>") != null))
    String val =(String)msgInBean.getValue(pageContext);
    validatePhone(val);
    u also have the following imports in the controller -
    import oracle.apps.fnd.framework.OAException;
    import oracle.apps.fnd.framework.webui.beans.message.OAMessageTextInputBean;
    import java.util.regex.Matcher;
    import java.util.regex.Pattern;
    I hope this will help u.
    Regards
    Renu

Maybe you are looking for

  • A challenge to Adobe: Allow me to use inline styles in DW by default or I dump DW

    Years ago I switched from FP to DW because FP started forcing people to use CSS over HTML. That was FP 2000. I switched to DW because it respected my code... Now that CSS is mainstream and we are all in love with it, DW CS4 decides to throw a bone an

  • How can I find duplicates in Photos app?

    I have a lot of all images that I imported to my mac way back from my old iPhones into folders on my hard drive, I know that there's some duplicates in those folders. But I dragged in everything to the new Photos app to clean up all the mess and keep

  • Dynamics crm 2015 : Portal Deployment / development - external users autehntication

    Dear all, I have just deployed my dynamics crm 2015 on-premise version. I would like to get some tips/guide about how to authenticate external users through portal to CRM. Example, I want my external users to be able to log case request through porta

  • Se desinscrire du programme Partner

    Comment puis-je me desincrire du programme Partner? Je veux retrouver toutes mes options directement avec la fonction "gerer de Muse et je n'ai pas de clients à gérer.

  • Formatted Search - Date Time Stamps

    Hi, We are trying to use a Date & Time Stamp for two udf's of which I will then calculate the difference in a report. I have a couple of issues. Ideally the user would enter the Start field (udf1), click Shift-F2 and that udf would be populated with