Originally Posted by
skaspersen
google "regex test harness" and follow that java turtorial. The class has helped me many a times when trying to get a regex right
I will work that in a moment, I am swamped right now.
I have a first 100% thanks to:
RegEx: online regular expression testing
Norm, how much code do you want? Try this to start with:
RegExLib.com Regular Expression Cheat Sheet (.NET Framework)
ftr: I was getting dizzy, it was all I could do to to remove all the fully specified package on every variable and 200 character lines with random strings for variable naming + proprietary removal. What I am trying to do is for an exact URL in the forms I am trying to get running in Servlets: Find and replace ( local | remote ) URL prior to doing a build in NetBeans so as to do testing on local then re-build for deploy on www using an exact swapping of host as defined in:
URI(String scheme, String host, String path, String fragment)
Each invocation of the tool provides two source files with dot extensions appended after .java
//
StringBuffer appendDeployExtension= new java.lang.StringBuffer(TestFind_2.this.currentFile.toString());
appendDeployExtension.append(".ship");
java.io.BufferedWriter b9544a26263b = new java.io.BufferedWriter(new java.io.FileWriter(appendDeployExtension.toString()));
//
StringBuffer appendPrototypeExtension= new java.lang.StringBuffer(TestFind_2.this.currentFile.toString());
appendPrototypeExtension.append(".proto");
java.io.BufferedWriter e16f3638c49 = new java.io.BufferedWriter(new java.io.FileWriter(appendPrototypeExtension.toString()));
leaving the original source file unmodified by doing a LineNumberReader.readline() then doing a BufferedWriter.append to each of the files from the String returned by the Regex's work.
I would then manually replace the souces in the NetBeans build directory from the shell and launch NetBeans, removing the appropriate file extension. It is telling that the code that NetBeans produces is exactly how I code, the elimination of such things as code folding and sluggish editor forces me to work from a cold-boot having never invoked NetBeans. After NB finishes, I go down to a cold start and do deploy manually to WEB-INF/classes/(app-dir)