import ret = 'String_BA22_FR22_BC'print(re.sub(r'(?<=FR)\d+','',t))
Standard input is empty
String_BA22_FR_BC
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!