#[Dyalog APL](http://goo.gl/9KrKoM) 16.0 (non-competing), <s>43</s> 37 [bytes](https://codegolf.meta.stackexchange.com/a/9429/43319)

<!-- language-all: lang-apl -->

Prompts for comment character, then for code.

    ↑(↓↑((-(⍸'|'∘=),≢)↑¨'|'∘≠⊆⊢)⍞),¨⊂¯2↑⍞

Non-competing because version 16.0's is newer than this challenge.