What would one do to match the termination of a string?
Results in:PHP Code:
$string = "A sentence. More words. Dot.End.";
$string = preg_replace("#(\.[\sE])#", "[INS]$1", $string);
How would one match the end of the string as well as "\s" and "E", so that it becomes:Code:
A sentence[INS]. More words[INS]. Dot[INS].End.
A sentence[INS]. More words[INS]. Dot[INS].End[INS].