Help extracting numbers from string field. RRS feed

  • Question

  • User-1841348780 posted

    I need some help extracting numbers from a sting field.

    for example if i have


    A. 12a3

    b. ab123

    c. 015a66

    i want to pull:

    A. 123

    B. 123

    c. 01566

    is there a formula to extract any numbers from a field?


    Monday, January 22, 2018 9:37 PM

All replies

  • User1633621018 posted

    All you need is

    var myString = "015a66";
    var onlyLetters = new String(myString.Where(Char.IsLetter).ToArray());

    Wednesday, February 7, 2018 10:09 PM