12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- define("dojo/regexp", ["./_base/kernel", "./_base/lang"], function(dojo, lang) {
-
-
-
-
- lang.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 + ")";
- };
- return dojo.regexp;
- });
|