I have the following long string:
$long_text = "aaaaaaaaaaaaaaaaaaaaaaaa[BS][BS][BS][BS][BS][BS][BS][BS]aaaaaaaaaaaaaaaaaaaaaaaa[BS][BS][BS][BS][BS][BS][BS][BS]aaaaaaaaaaaaaaaaaaaaaaaa[BS][BS][BS][BS][BS][BS][BS][BS]aaaaaaaaaaaaaaaaaaaaaaaa[BS][BS][BS][BS][BS][BS][BS][BS]";
And I would like use [BS] as backspace. So I have the following code:
$long_text = preg_replace('/.(?R)*\[BS\]/', '', $long_text);
But It doesn't work because the string is too long.
Can someone help me and tell me why can't PHP handle this long text? Is there any way to handle it? (it works with shorter texts)