|
@@ -71,16 +71,6 @@ const Regex = {
|
|
value: "[A-Za-z\\d/\\-:.,_$%\\x27\"()<>= !\\[\\]{}@]{4,}"
|
|
value: "[A-Za-z\\d/\\-:.,_$%\\x27\"()<>= !\\[\\]{}@]{4,}"
|
|
},
|
|
},
|
|
],
|
|
],
|
|
- /**
|
|
|
|
- * @constant
|
|
|
|
- * @default
|
|
|
|
- */
|
|
|
|
- REGEX_CASE_INSENSITIVE: true,
|
|
|
|
- /**
|
|
|
|
- * @constant
|
|
|
|
- * @default
|
|
|
|
- */
|
|
|
|
- REGEX_MULTILINE_MATCHING: true,
|
|
|
|
/**
|
|
/**
|
|
* @constant
|
|
* @constant
|
|
* @default
|
|
* @default
|
|
@@ -100,15 +90,21 @@ const Regex = {
|
|
* @returns {html}
|
|
* @returns {html}
|
|
*/
|
|
*/
|
|
runRegex: function(input, args) {
|
|
runRegex: function(input, args) {
|
|
- let userRegex = args[1],
|
|
|
|
|
|
+ const userRegex = args[1],
|
|
i = args[2],
|
|
i = args[2],
|
|
m = args[3],
|
|
m = args[3],
|
|
- displayTotal = args[4],
|
|
|
|
- outputFormat = args[5],
|
|
|
|
- modifiers = "g";
|
|
|
|
|
|
+ s = args[4],
|
|
|
|
+ u = args[5],
|
|
|
|
+ a = args[6],
|
|
|
|
+ displayTotal = args[7],
|
|
|
|
+ outputFormat = args[8];
|
|
|
|
+ let modifiers = "g";
|
|
|
|
|
|
if (i) modifiers += "i";
|
|
if (i) modifiers += "i";
|
|
if (m) modifiers += "m";
|
|
if (m) modifiers += "m";
|
|
|
|
+ if (s) modifiers += "s";
|
|
|
|
+ if (u) modifiers += "u";
|
|
|
|
+ if (a) modifiers += "A";
|
|
|
|
|
|
if (userRegex && userRegex !== "^" && userRegex !== "$") {
|
|
if (userRegex && userRegex !== "^" && userRegex !== "$") {
|
|
try {
|
|
try {
|
|
@@ -275,7 +271,7 @@ const Regex = {
|
|
if (displayTotal)
|
|
if (displayTotal)
|
|
output = "Total found: " + total + "\n\n" + output;
|
|
output = "Total found: " + total + "\n\n" + output;
|
|
|
|
|
|
- return output;
|
|
|
|
|
|
+ return output.slice(0, -1);
|
|
},
|
|
},
|
|
};
|
|
};
|
|
|
|
|