php - Remove string from string contain specific -
i need this:
string = 'wednesday dynamic date'; remove word contain day means remove sunday, monday, tuesday, wednesday. output need dynamic date.
use preg_replace that:
echo preg_replace("/\b[a-z]*day\b/i", '', "wednesday dynamic date"); // output: dynamic date
Comments
Post a Comment