1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- if(!dojo._hasResource["dojo.regexp"]){
- dojo._hasResource["dojo.regexp"] = true;
- dojo.provide("dojo.regexp");
- dojo.getObject("regexp", true, dojo);
- dojo.regexp.escapeString = function(/*String*/str, /*String?*/except){
-
-
-
-
- return str.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, function(ch){
- if(except && except.indexOf(ch) != -1){
- return ch;
- }
- return "\\" + ch;
- });
- };
- dojo.regexp.buildGroupRE = function(/*Object|Array*/arr, /*Function*/re, /*Boolean?*/nonCapture){
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- if(!(arr instanceof Array)){
- return re(arr);
- }
-
- var b = [];
- for(var i = 0; i < arr.length; i++){
-
- b.push(re(arr[i]));
- }
-
- return dojo.regexp.group(b.join("|"), nonCapture);
- };
- dojo.regexp.group = function(/*String*/expression, /*Boolean?*/nonCapture){
-
-
-
-
-
- return "(" + (nonCapture ? "?:":"") + expression + ")";
- };
- }
|