You are viewing a single comment's thread. Return to all comments →
import re import sys S = sys.stdin.read() for i in re.findall(r"/\*[\S\s]*?\*/|//.*",S): i = re.sub(r"\n\s+",r"\n",i) print(i)
/\*[\S\s]*?\*/|//.* # \S One non-whitespace # \s whitespace: [\t\n\r\f\v] # *? Laziness (Curb Greediness for Repetition Operators)
Seems like cookies are disabled on this browser, please enable them to open this website
Building a Smart IDE: Identifying comments
You are viewing a single comment's thread. Return to all comments →