i want a php function probably regular expression to find and replace a string that starts with a constant string and ends up with a specific string and the text mentioned within those strings.. e.g.,
[Starting String]..anything.. [Ending String]
and i want to remove above pattern of string with empty space.. Kindly advise!!
preg_quoteis used to be sure that you will not break the regexp with some specific for regexp characters in your ‘Starting’ and ‘Ending’ strings, like[]For
$str = ' blah blah [Starting String] something [Ending String] blah blah';the result would beblah blah blah blah