How to set non empty variable inside matchtext
Posted: Fri Oct 16, 2015 9:20 am
Hi gurus,
I have a variable exp which contains regular expression (may or may not contains number of parathesis)
so i take the count of parathesis from some code. if one parathesis found then P1, two parathesis found then P2, three parathesis found then P3, so on
How can i use P!,P2,P3 inside mathchtext
I put P!,P2,P3 into variable p, but its not working, p taken as one variable.
Thanks,
Samjith
I have a variable exp which contains regular expression (may or may not contains number of parathesis)
so i take the count of parathesis from some code. if one parathesis found then P1, two parathesis found then P2, three parathesis found then P3, so on
How can i use P!,P2,P3 inside mathchtext
I put P!,P2,P3 into variable p, but its not working, p taken as one variable.
Code: Select all
function myregex test
repeat with i = 1 to the number of lines in field "Main Field"
put parathesis(names) into p --I put P!,P2,P3 into variable p
if matchText(field "Main Field",exp, p) then
answer p
return p
else
return "Not found"
end if
end repeat
end myregex
Samjith