Project

General

Profile

Download (742 Bytes) Statistics
| Branch: | Revision:
1
/*
2
	Copyright (c) 2004-2008, The Dojo Foundation All Rights Reserved.
3
	Available via Academic Free License >= 2.1 OR the modified BSD license.
4
	see: http://dojotoolkit.org/license for details
5
*/
6

    
7

    
8
if(!dojo._hasResource["dojo.regexp"]){
9
dojo._hasResource["dojo.regexp"]=true;
10
dojo.provide("dojo.regexp");
11
dojo.regexp.escapeString=function(_1,_2){
12
return _1.replace(/([\.$?*!=:|{}\(\)\[\]\\\/^])/g,function(ch){
13
if(_2&&_2.indexOf(ch)!=-1){
14
return ch;
15
}
16
return "\\"+ch;
17
});
18
};
19
dojo.regexp.buildGroupRE=function(_4,re,_6){
20
if(!(_4 instanceof Array)){
21
return re(_4);
22
}
23
var b=[];
24
for(var i=0;i<_4.length;i++){
25
b.push(re(_4[i]));
26
}
27
return dojo.regexp.group(b.join("|"),_6);
28
};
29
dojo.regexp.group=function(_9,_a){
30
return "("+(_a?"?:":"")+_9+")";
31
};
32
}
(23-23/26)