 <p>This is not a complete answer in any way, but I did find it helpful to use this regular expression: </p> <p><code>// *\#if|\#el|\#en</code></p> <p>which searches for // followed by any amount of whitespace (including none) and then either #if, #el or #en (to exclude the possibility of throwing up all the pragma's etc - this could definitely be improved upon.</p> <p>luckily I only have to search in my open documents, which is several hundred but it could be A LOT worse. Hope this helps someone in the future, this is horrible!</p>