summaryrefslogtreecommitdiff
path: root/includes/js/dojo/regexp.js
diff options
context:
space:
mode:
authormensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2008-11-14 15:39:19 +0000
committermensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2008-11-14 15:39:19 +0000
commit1c5685d68f1b73270fb814fe04cbb490eb90ba5f (patch)
tree3d3ada08a934b96fc31531f1327690d7edc6f766 /includes/js/dojo/regexp.js
parent104d59099e048688c4dbac37d72137006e396558 (diff)
downloadsemanticscuttle-1c5685d68f1b73270fb814fe04cbb490eb90ba5f.tar.gz
semanticscuttle-1c5685d68f1b73270fb814fe04cbb490eb90ba5f.tar.bz2
Minor fix: Remove DOJO library (60Mo) replaced by link to Google CDN (online DOJO library)
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@159 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'includes/js/dojo/regexp.js')
-rw-r--r--includes/js/dojo/regexp.js69
1 files changed, 0 insertions, 69 deletions
diff --git a/includes/js/dojo/regexp.js b/includes/js/dojo/regexp.js
deleted file mode 100644
index 302a5b4..0000000
--- a/includes/js/dojo/regexp.js
+++ /dev/null
@@ -1,69 +0,0 @@
-if(!dojo._hasResource["dojo.regexp"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo.regexp"] = true;
-dojo.provide("dojo.regexp");
-
-/*=====
-dojo.regexp = {
- // summary: Regular expressions and Builder resources
-};
-=====*/
-
-dojo.regexp.escapeString = function(/*String*/str, /*String?*/except){
- // summary:
- // Adds escape sequences for special characters in regular expressions
- // except:
- // a String with special characters to be left unescaped
-
-// return str.replace(/([\f\b\n\t\r[\^$|?*+(){}])/gm, "\\$1"); // string
- return str.replace(/([\.$?*!=:|{}\(\)\[\]\\\/^])/g, function(ch){
- if(except && except.indexOf(ch) != -1){
- return ch;
- }
- return "\\" + ch;
- }); // String
-}
-
-dojo.regexp.buildGroupRE = function(/*Object|Array*/arr, /*Function*/re, /*Boolean?*/nonCapture){
- // summary:
- // Builds a regular expression that groups subexpressions
- // description:
- // A utility function used by some of the RE generators. The
- // subexpressions are constructed by the function, re, in the second
- // parameter. re builds one subexpression for each elem in the array
- // a, in the first parameter. Returns a string for a regular
- // expression that groups all the subexpressions.
- // arr:
- // A single value or an array of values.
- // re:
- // A function. Takes one parameter and converts it to a regular
- // expression.
- // nonCapture:
- // If true, uses non-capturing match, otherwise matches are retained
- // by regular expression. Defaults to false
-
- // case 1: a is a single value.
- if(!(arr instanceof Array)){
- return re(arr); // String
- }
-
- // case 2: a is an array
- var b = [];
- for(var i = 0; i < arr.length; i++){
- // convert each elem to a RE
- b.push(re(arr[i]));
- }
-
- // join the REs as alternatives in a RE group.
- return dojo.regexp.group(b.join("|"), nonCapture); // String
-}
-
-dojo.regexp.group = function(/*String*/expression, /*Boolean?*/nonCapture){
- // summary:
- // adds group match to expression
- // nonCapture:
- // If true, uses non-capturing match, otherwise matches are retained
- // by regular expression.
- return "(" + (nonCapture ? "?:":"") + expression + ")"; // String
-}
-
-}