Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
help findrx (extract numbers)
#2
Code:
Copy      Help
str s="John 10 Anne 100 Peter 5 Andrew 1525 12"

ARRAY(str) a
if(findrx(s "\d+" 0 4 a))
,int i
,for i 0 a.len
,,out a[0 i]

;findrx with flag 4 finds all matches and creates two-dimensional array.
;First dimension is used for match (index 0) and submatches (not used here).


Messages In This Thread

Forum Jump:


Users browsing this thread: 4 Guest(s)