import res='''import sadfsda; import asdf sdaf import asdfas dfasdf'''rx = r'(?<![^;\n])\s*(import)'print( re.sub(rx, r'{{\g<0>}}', s) )
Standard input is empty
{{import}} sadfsda;{{ import}} asdf sdaf {{import}} asdfas dfasdf
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!