regexprep Replace text using regular expression collapse all in page Syntax newStr = regexprep(str,expression,replace) example newStr = regexprep(str,expression,replace,option1,...optionM) example Description example newStr = regexprep(str,expression…