Skip to main content
Participant
July 26, 2008
Question

convert string to numeric

  • July 26, 2008
  • 2 replies
  • 379 views
I have the following values and would like to convert them to numeric only:
eg.
(86)1234-1234 => 8612341234 ; non numeric characters
(1) 1234 1234 => 112341234 ; remove spaces

Pls kindly advise.
    This topic has been closed for replies.

    2 replies

    Inspiring
    July 26, 2008
    #REReplace(strToReplace, "[^0-9]", "", "ALL")#

    --
    Ken Ford
    Adobe Community Expert - Dreamweaver/ColdFusion
    Fordwebs, LLC
    http://www.fordwebs.com


    "dynason" <webforumsuser@macromedia.com> wrote in message news:g6ec7n$7a0$1@forums.macromedia.com...
    >I have the following values and would like to convert them to numeric only:
    > eg.
    > (86)1234-1234 => 8612341234 ; non numeric characters
    > (1) 1234 1234 => 112341234 ; remove spaces
    >
    > Pls kindly advise.
    >
    Inspiring
    July 26, 2008
    look up REREPLACE() function in the cfml reference and regular
    expressions in CF topic in the Dev Guide. specifically regex classes
    will be useful to you here

    Azadi Saryev
    Sabai-dee.com
    http://www.sabai-dee.com/