The "operator expected" error in the log points to the ( after "contains". I didn't see anything in the x4 documentaton about strings<do_if value="not contains($completedname, $factionprefix)">
other than formatting. Does the x4 API even support this type of action?