Regexp function to extract numbers

Hello, 

Does Appian have any inbuilt function to extract numbers only from a text string?

Eg: If the string field is "ABC 123" then how to get the value of 123

 

Thanks, 

Rohit 

  Discussion posts and replies are publicly visible

Parents Reply Children
  • 0
    Certified Lead Developer
    in reply to Amit Mishra

    A lot of these examples appear to show a fundamental misunderstanding of regex. If you'd like to do this using regex, you can use:

    fn!regexallmatches(
      "[0-9]+",
      "ABC 123"
    )

    Note that you'll have to choose between fn!regexallmatches and fn!regexfirstmatch depending on your data; the former returns a list of matches and the latter returns only the first match.

    If you'd like to see and/or test regexes, this tool is an excellent option and (as per the link) allows you to share and test regexes.