I have a text like "MASTER_LECTURE.NAME" so want to replace *MASTER_LECTURE* with space or another string. how to do that on regex php?
*i'm very newbie for REGEX. thanks
You can do this with regular expression or simple string function
$string = 'MASTER_LECTURE.NAME';
$string_replace = 'MASTER_LECTURE';
// Regular expression
preg_replace('/'.preg_quote($string_replace).'/is', '', $string);
// String function
$string = str_replace($string_replace, '', $string);
if you are only replacing a string and not a pattern you can use str_replace