Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
find multiple occurrences of a string within big string
#2
Use regular expression.

Macro Macro284
Code:
Copy      Help
str s=
;value 1= blue
;value 2 = red
;value 1 = green
;value 3= black

ARRAY(str) a; int i
if(!findrx(s "\bvalue 1 *= *(\w+)" 0 4 a)) out "not found"; ret

out a.len
for i 0 a.len
,out a[1 i]
,


Messages In This Thread
RE: find multiple occurrences of a string within big string - by Gintaras - 06-12-2019, 01:32 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)