import re
comment = re.compile(r'(?<=//)[^\n]*|(?<=/\*).*?(?=\*/)', re.M|re.S)

a = '''
//////////////////////comment1/////////////////
var = 43; // comment2
/* comment3
comment4
*/
/* comment5 */'''

comment.findall(a)
=>
['////////////////////comment1/////////////////',
'',
' comment2',
' comment3\ncomment4\n',
' comment5 ']