String Replace in PHP

tommyj

New Member
I have string named \[code\]File_Test_name_1285931677.xml\[/code\]. \[code\]File\[/code\] is the common word and \[code\]1285931677\[/code\] is a random number.I want to remove \[code\]File_\[/code\] and \[code\]_1285931677.xml\[/code\], i.e. prefix up to first \[code\]_\[/code\] and suffix from last \[code\]_\[/code\] on.
 
Back
Top