diff --git a/regex/regex.xml b/regex/regex.xml index 667fd20d..7412cc14 100644 --- a/regex/regex.xml +++ b/regex/regex.xml @@ -17,43 +17,35 @@ ; - myResponse.match0 += {match} + var re, match, matches, myResponse,patt; + + //if there is a replacement for matches + if (replacement) { + match = text.replace(re, replacement); + myResponse = ; + myResponse.match0 += {match} - - } else { - - matches = re.exec(text); + } else { + if (modifiers) { + patt = /expression/modifiers; + } else { + patt = /expression/; + } + matches = text.match(patt); + if (matches) { + myResponse = ; + for (i=0;i{matches[i]}; + } - if (matches) { - myResponse = ; + } else if (showempty) { + myResponse = ; + } - for (i=0;i{matches[i]}; - } + } + response.object = myResponse; - } else if (showempty) { - myResponse = ; - } - - } - - response.object = myResponse; - - - ]]> + ]]> \ No newline at end of file