Estimated read time: 1 minutes
f.*<\/p>/, '') ""
this is greedy. you want to get something like:
f.*?<\/p>/, '') "
and yes, that's what we wanted. also it works for .+?, and so on.
ah and as a side note, it seems '.' does not match newlines, so you'll have to work around it like:
f[\s\S]*?<\/p>/, '') "