Posts containing a given macro with no macro definition

1

Please login or register to vote for this query.

(click on this box to dismiss)

Physical Fitness Meta

Q&A about the site for physical fitness professionals, athletes, trainers, and those providing health-related needs

--We do not want the macro to be followed by alphanumerical character
--For example we want to match: \C but not \Cov, \norm but not \normalsize, \Q but not \quad
--thanks to rene for suggestion to use regex: https://chat.meta.stackexchange.com/transcript/1223/2019/2/1
SELECT TOP ##num?50##
  Id As [Post Link], OwnerUserId AS [User Link], CreationDate, LastActivityDate,  Score, ViewCount, Body
  FROM Posts WHERE (Body LIKE '%[^\]##text?\C##[^a-zA-Z]%') 
    AND NOT(Body LIKE '%\newcommand%') 
    AND NOT(Body LIKE '%\DeclareMathOperator%') 
    AND NOT(Body LIKE '%\def%') 
  ORDER BY CreationDate DESC

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results