try
tell application "Mail"
set filterName to item 1 of (get name of rules where its rule condition's _expression_ contains theClue)
set ruleNames to name of rules
repeat with ruleNameIndex from 1 to length of ruleNames
if item ruleNameIndex of ruleNames = filterName then exit repeat
end repeat
set ruleExpression to rule filterName's rule condition's _expression_
repeat with expressionIndex from 1 to length of ruleExpression
if item expressionIndex of ruleExpression = filterName then exit repeat
end repeat
end tell
{filterName, ruleNameIndex, expressionIndex}
on error errMsg number errNum
set {cr, sep} to {return, "------------------------------------------"}
set e to sep & cr & "Error: " & errMsg & cr & sep & cr & "Error Number: " & errNum & cr & sep
beep
display dialog e
end try