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