[MOBY-guts] biomoby commit

Paul Gordon gordonp at dev.open-bio.org
Wed Aug 1 18:15:46 UTC 2007


gordonp
Wed Aug  1 14:15:46 EDT 2007
Update of /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/services
In directory dev.open-bio.org:/tmp/cvs-serv13052/src/main/ca/ucalgary/seahawk/services

Modified Files:
	MobyComplexBuilder.java 
Log Message:
Fixed regular expression that matches capture groups (was causing some XPath statements to not get cap group references substituted)
moby-live/Java/src/main/ca/ucalgary/seahawk/services MobyComplexBuilder.java,1.11,1.12
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/services/MobyComplexBuilder.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/services/MobyComplexBuilder.java	2007/07/23 21:35:25	1.11
+++ /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/services/MobyComplexBuilder.java	2007/08/01 18:15:46	1.12
@@ -448,7 +448,7 @@
 		}
 	    }
 	    // $# substitution in a string, considerably simpler!
-	    else if(result.matches("^\\$"+j+"(?=\\D.*|\\z)")){
+	    else if(result.matches("\\A.*?\\$"+j+"(?:\\D.*)?\\z")){
 		String varValue = match.group(j);
 		if(whitespaceMode == null){
 		    // do nothing
@@ -463,7 +463,6 @@
 		    varValue = varValue.trim(); // removes leading and trailing whitespace
 		}
 		result = result.replaceAll("\\$"+j+"(?=\\D|\\z)", varValue);
-		
 		// Binary data and XPath are incompatible, since many bytes are not allowed in XML
 		// so only create the node list if not Base64 encoding
 		if(nonBasic){




More information about the MOBY-guts mailing list