Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2013
    Posts
    1

    Unanswered: issue with replace part of string

    Hi,

    I have a list with mobilephone numbers from several countries that I need to format in a specific way.
    I need phone numbers to all begin with "00Countrycode" (example, Sweden = 0046).

    An example of numbers that I have and that needs to be adjusted are:
    0701234567, should be 0046701234567
    +46701234567, should be 0046701234567
    01712345678, should be 00491712345678
    +491712345678, should be 00491712345678

    Is there some way to replace all these in the same call into the same table?

    Thanks in advance and let me know if you need any more information!

  2. #2
    Join Date
    Feb 2008
    Location
    Japan
    Posts
    3,483
    The requiremens and the rational to produce the results are not clear for me,
    like showed in ialic red
    ...
    I need phone numbers to all begin with "00Countrycode" (example, Sweden = 0046).

    An example of numbers that I have and that needs to be adjusted are:
    Code:
       0701234567, should be 0046701234567     /* lengh was 13 */
     +46701234567, should be 0046701234567     /* lengh was 13 */
      01712345678, should be 00491712345678    /* lengh was 14 */ /* Added 0049 as Countrycode? */
    +491712345678, should be 00491712345678    /* lengh was 14 */ /* Added 0049 as Countrycode? */

  3. #3
    Join Date
    Feb 2008
    Location
    Japan
    Posts
    3,483
    Are there any other patterns like
    Code:
         701234567, should be 0046701234567 ?   /* No leading zero(es) */
     +046701234567, should be 0046701234567 ?   /* Leading with + and one zero */
    +0046701234567, should be 0046701234567 ?   /* Leading with + and two zeroes */
     0046701234567, should be 0046701234567 ?   /* Leading with 0046 without + */
    +0081701234567, should be 0081701234567 ?   /* Leading with + and two zeroes */
     0081701234567, should be 0081701234567 ?   /* Leading with 0081 without + */
    +0281701234567, should be 0281701234567 ?   /* Leading with + and one zero */
     0281701234567, should be 0281701234567 ?   /* Leading with 0281 without + */
     +123701234567, should be 0123701234567 ?   /* Leading with + and no zero */
      +46701234567, should be 0046701234567 ?   /* Leading with + and no zero */
    Please clarify the all posssible patterns and the rational to produce the results from the posssible patterns.
    Last edited by tonkuma; 03-19-13 at 15:20.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •