<?php $str = 'некий текст[36465464]'; echo $str, PHP_EOL;echo preg_replace('/\[\d+\]/', '', $str);
Standard input is empty
некий текст[36465464] некий текст
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!