var s="my javascript is very poor,who can help me?"
var reg=/(\w*)my(.*)is(.*)can(.*)/g
console.log(s.replace(reg,"$1his$2was$3could$4"));