language: Python (python 2.7.3)
date: 325 days 3 hours ago
link:
visibility: public
1
2
3
4
5
6
text = "text1\ntext2\nhttp://url.com/bla1/blah1/\ntext3\ntext4\nhttp://url.com/bla2/blah2/\ntext5\ntext6"  
 
import re
text = re.sub(r'^https?:\/\/.*[\r\n]*', '', text, flags=re.MULTILINE)
 
print text
  • upload with new input
  • result: Success     time: 0.08s    memory: 10864 kB     returned value: 0

    text1
    text2
    text3
    text4
    text5
    text6