I need a Php-RegEx to find all double spaces between a start-keyword and end-keyword and remove them.
$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';
I need the follow result:
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 what I've tried: (But it does not work)
$teststring = preg_replace('#(:keyword_start:)\s\s+(:keyword_end:)#si', '', $teststring);
Can anyone help me ?