[Progress Communities] [Progress OpenEdge ABL] Forum Post: Extract only numbers of a string

  • Thread starter Thread starter goo
  • Start date Start date
Status
Not open for further replies.
G

goo

Guest
11.7 What is the simplest and quickest way of extracting numbers of a string variable? I found this: return new String(input.Where(Char.IsDigit).ToArray()); But found it a bit diffecult to translate into Progress :-) def var myString as char no-undo. myString = 'this is a 1234 tekst'. myNumber = CAST(BOX(myString),System.String)....... either that, or do a loop on the string checking numbers....

Continue reading...
 
Status
Not open for further replies.
Back
Top