--- In [email protected], "lakeshoresurfer" <camice...@...> wrote:
>
> Your regex alternative works fine. I am not too familiar yet with
> regex, but could you please show how this line would change if I
> wanted all lines containing trigger2 AND trigger4 to be removed ?
Regex is better for "or" conditions than "and" (unless you know the strings
always occur in a particular order). But since there are just a couple of
"anded" items its not bad. Try:
local p
p = ?"(?im)^(?:.*?trigger2.*?trigger4.*|trigger4.*?trigger2.*)\R"
clip.set(regex.pcrereplace(p,clip.get,""))
messagebox("OK", clip.get)
Regards,
Sheri