#!/usr/local/bin/node var text = 'てすとですよ。' var rule = 'text.match(/ですよ/)' if(eval(rule)){ console.log(text) }