!Beginner regular expressions Python

Hey,guys!I really really need your help with regular expressions.How to change any text in python into user`s input?So it would be this way:
<<name!>> replace by name

input.txt:''My name is <<!name!>>
I study at <<!univ!>>
name=input("Wiyn")
univ=input("Wdays")
 output.txt:"<<!name!>> replace by name,that the user inputed