feat(regexp_search): port and modify from RegExp.prototype.search

Please review my code and give me some advice, thanks @tomchentw .