Posts containing the given macro with no macro definition


Please login or register to vote for this query.

(click on this box to dismiss)

Audio-Video Production Meta

Q&A about the site for engineers, producers, editors, and enthusiasts spanning the fields of video, and media creation

--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:
SELECT TOP ##num?100##
  Id As [Post Link], 
  url = 'site://posts/' + CAST(Id AS varchar)+'/revisions',
  OwnerUserId AS [User Link], CreationDate, LastActivityDate,  Score, ViewCount, Body
  FROM Posts WHERE (Body LIKE '%[^\]\##text?cl##[^a-zA-Z]%') 
    AND NOT(Body LIKE '%newcommand%') 
--we want to catch both \newcommand and \renewcommand    
    AND NOT(Body LIKE '%\DeclareMathOperator%') 
    AND NOT(Body LIKE '%\def%') 
  ORDER BY CreationDate DESC

Enter Parameters

Switch sites:
loading Hold tight while we fetch your results