Мне нужен Php-RegEx, чтобы найти все двойные пробелы между ключевым словом start и end и удалить их.
$teststring = 'This is a teststring ... :keyword_start: this is the content with double spaces :keyword_end: more text ... :keyword_start: this is the second content with double spaces :keyword_end: ... more text';
Мне нужен следующий результат:
This is a teststring ... :keyword_start: this is the content with double spaces :keyword_end: more text ... :keyword_start: this is the second content with double spaces :keyword_end: ... more text
Это то, что я пробовал: (но это не работает)
$teststring = preg_replace('#(:keyword_start:)\s\s+(:keyword_end:)#si', '', $teststring);
Может кто-нибудь помочь мне ?