Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
string in regular expression/
#2
Macro Macro1565
Code:
Copy      Help
str s1 s2
int i
s1="string1"
s2="string2"
i=findrx(s1 F"a\d{6}\Q{s2}\E")
out i
if(i<0) ret

The F makes possible to use variables in the string. In this case we use s2 enclosed in {}.
The \Q\E disables special regular expression characters in s2.


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)