Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Regex help
#2
This is not perfect but worth a try...

Macro Macro17
Code:
Copy      Help
str ss s="some text [text1] (text2) [text3] someothertext (text4)"
ARRAY(str) a b
int numMatch=findrx(s "\[.*?\d+\]|\(.*?\d+\)" 0 4 a)
for int'i 0 numMatch
,ss += _s.from(a[0 i] " ")
tok(ss b)
for i 0 numMatch
,out b[i]


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)