Search code examples
spotfire

How to get numbers from string in spotfire


How to extract numbers from string in spotfire ...

Example:

Input column: ACD:1234F

Output column: 1234

Help is really aprreciated


Solution

  • Please look at these questions you posted and accept the answers if you feel they are correct. I know for certain they are correct.

    Spotfire IF Statement in Custom Expression

    how to eliminate outlier in spotfire box plots

    For this case, this will extract numbers. Just replace [Column1] with what ever your column is.

    RXReplace([Column1],"(?!\\d).","","gis")
    
    
    
    Column1     NumberExtract
    1a2b3c4d    1234
    123abc345   123345
    abc123def   123