Write a wordfilter function


Problem

Write a wordFilter function

Make a function in PHP, wordFilter($str) that takes a string representing a sentence as a parameter. It should replace all occurrences of certain blacklisted words with asterisks of the same length and return the substituted sentence. The words "shoot" "darn" and "fudge" (case insensitive) are considered blacklisted. However, these words as part of a larger word should be left alone (e.g. overshoot is fine as it is). Use one or more regular expressions with replacements in your solutions (e.g. preg_replace).

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Write a wordfilter function
Reference No:- TGS03332531

Expected delivery within 24 Hours