package com.smtscript.lib; import java.util.regex.Pattern; import com.smtscript.lib.regex.JSRegex; public class JSStaticRegex extends JSStaticAbstract { public JSRegex create(Object pattern) throws Exception { return new JSRegex(_parentScope, pattern); } public boolean matches(String pattern, String text) { return Pattern.matches(pattern, text); } public String replace(Object pattern, String text, Object replace) throws Exception { return create(pattern).matcher(text).replace(replace); } }