Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Search question
#2
Missing \ before some .

Code:
Copy      Help
str s1="aaaa 10.123.456.789 bbbb[]aaaa 20.123.456 bbbb[]aaaa 25.123.456.789 bbbb"
ARRAY(str) a

if(findrx(s1 "(10|20|25)\.\d{1,3}\.\d{1,3}\.\d{1,3}" 0 4 a)=0) ret ;;exit if not found
;if(findrx(s1 "(10|20|25)(?:\.\d{1,3}){3}" 0 4 a)=0) ret ;;this also works


int i
for i 0 a.len
,out "%s, %s" a[0 i] a[1 i]


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)