import rest = "hello[_ng11][test]hello3[_ngRTf]"modified_string = re.sub(r"\[_ng[^][]*]", "[]", st)print(modified_string)
Standard input is empty
hello[][test]hello3[]
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!