fork download
  1. # your code goes here
  2. import re
  3. a="this is the line with a [[filename01 as a wiki type link]] inside"
  4. print(re.sub("(\s)+(?=[^[]*?\]\])","_",a))
Success #stdin #stdout 0.02s 9472KB
stdin
Standard input is empty
stdout
this is the line with a [[filename01_as_a_wiki_type_link]] inside