Hi Percy,
#Anyway, I still haven't tried the Apache RegExp - could you please #enlighten me on this - or perhaps give me some pointers on RegExp #installation/configuration (apache has very very very poor user manuals). # 1. Download the binary: http://jakarta.apache.org/builds/jakarta-regexp/release/v1.2/ 2. Extract the file (tar.gz) in a convinient directory. I normally put all JARs I want to be globally available to all Java programs in /usr/local/lib/java; I have a local startup script which includes all the .jar files in the directory into the system CLASSPATH. 3. Set your system CLASSPATH, or just add the jakarta-regexp-1.2.jar as part of the -classpath param when invoking the JVM. Like this.. java -classpath $CLASSPATH:/path/to/regexp/javakarta-regexp-1.2.jar com.gandababae.JoyceJimenez 4. Here's a sample. ... String data = "joyce jimenez"; String exp = "^joy*nez$"; RE re = new RE( exp ); if( re.match( data ) ) System.out.println( data + ". Ganda Babae!" ); ... For more information on RegExp, I suggest you peruse through the javadoc which is included in the tarball. Here's the only version of the javadoc. http://jakarta.apache.org/regexp/apidocs/ 5. If you need AWK, Perl split/search and replace functionality, you can opt for ORO as opposed to vanilla RegExp. http://jakarta.apache.org/oro/ HTH jeff -- -- Jeff Gutierrez Mapua Online! http://www.mapua.org http://www.mapua.com http://www.mapua.net Pinoy Ako! May reklamo? _ Philippine Linux Users Group. Web site and archives at http://plug.linux.org.ph To leave: send "unsubscribe" in the body to [EMAIL PROTECTED] To subscribe to the Linux Newbies' List: send "subscribe" in the body to [EMAIL PROTECTED]
