Using matchText with PCRE
Posted: Wed May 06, 2009 11:19 pm
hi, here's a code snippet:
repeat for each line thisLine in field ParsingCurrent.HTMLText.Field
if matchText(thisLine,"(?Usi)(/\w+@[a-z_]+\.[a-z]{2,})",matchedEmail) then put matchedEmail after matchedList
end repeat
I have tried this several different ways. I even used only "(?Usi)href" as the regex and it wouldn't put anything into matchedList.
If I use:
if matchText(thisLine,"(?Usi)href", matchedEmail) then answer matchedEmail
it works.
The bottom line is, I can't get the PCRE expression up above to match any emails in the list I'm reading, and then I can't get anything that does match to create a new list in the matchedList variable.
repeat for each line thisLine in field ParsingCurrent.HTMLText.Field
if matchText(thisLine,"(?Usi)(/\w+@[a-z_]+\.[a-z]{2,})",matchedEmail) then put matchedEmail after matchedList
end repeat
I have tried this several different ways. I even used only "(?Usi)href" as the regex and it wouldn't put anything into matchedList.
If I use:
if matchText(thisLine,"(?Usi)href", matchedEmail) then answer matchedEmail
it works.
The bottom line is, I can't get the PCRE expression up above to match any emails in the list I'm reading, and then I can't get anything that does match to create a new list in the matchedList variable.