Re: Memo: Re: whitespace character
below works for me. import org.apache.oro.text.perl.Perl5Util; public class Orotest { public Orotest () { } public static void main (String [] args) { Perl5Util perl5 = new Perl5Util(); String regex = m/ISIN\\s[A-Z]{12}/; if (perl5.match(regex, ISIN DS)) { System.out.println(match1); } if (perl5.match(regex, ISIN)) { System.out.println(match2); } } } D:\tempjava -cp d:\projects\jakarta-oro-2.0.8\jakarta-oro-2.0.8.jar;. Orotest java -cp d:\projects\jakarta-oro-2.0.8\jakarta-oro-2.0.8.jar;. Orotest match1 D:\temp Hi. These do not work either. Am I using older version or something. Plese advise. thanks and regards, rajesh s. HSBC Software Development (India) Pvt Ltd HSBC Center, Riverside, West Avenue, 25-B Raheja Woods, Kalyani Nagar, Pune 411006. Telephone: +91 20 26683000 Fax: +91 20 26681030 ** This E-mail is confidential. It may also be legally privileged. If you are not the addressee you may not copy, forward, disclose or use any part of it. If you have received this message in error, please delete it and all copies from your system and notify the sender immediately by return E-mail. Internet communications cannot be guaranteed to be timely, secure, error or virus-free. The sender does not accept liability for any errors or omissions. ** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Memo: whitespace character
Hi, its not working because you r using a special character inside the set [], so it is recognized as the set (\, s) i think. Use either [ \\n\\f\\r\\t] or better, \\s (without the []). regards, Jeroen. Hi. My ORO Pattern is like this ^ISIN[\\s]{1}[A-Z]{12}. But it does not match a string ISIN . There is some problem with white space character beacuse if I remove it. both from the pattern and the string then it matches the string. What is the problem? Thanks and regards, Rajesh K Sharma. HSBC Software Development (India) Pvt Ltd HSBC Center, Riverside, West Avenue, 25-B Raheja Woods, Kalyani Nagar, Pune 411006. Telephone: +91 20 26683000 Fax: +91 20 26681030 ** This E-mail is confidential. It may also be legally privileged. If you are not the addressee you may not copy, forward, disclose or use any part of it. If you have received this message in error, please delete it and all copies from your system and notify the sender immediately by return E-mail. Internet communications cannot be guaranteed to be timely, secure, error or virus-free. The sender does not accept liability for any errors or omissions. ** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: A matter of comparison
I'm a very happy oro user because it matches the perl5.x regexps best. Speed is not really an issue for me as I use it merely in batch like processes. Rarely in reallife internet apps. I would recommend boycotting Sun and their regexp, as they ccuurently copy-paste all the nice open source code in a Micro$oft way (without the $$). Besides that a lot of java programmers still use 1.3, using 1.4 regexp would make your code downwards incompatible. On the other hand I remember a mail from Daniel F S @ some point stating that oro is slower than sun 1.4 regexp. I wouldnt use jakarta regexp, as I ve never seen being used. Oro is supplied in many industry packages, and I would consider it the industry standard for this moment. Maybe you should use both and see which one you like best! Good luck, Jeroen. Hi, I am posting on both groups as I am deciding. How does ORO and RegExp compare to the regexp package in Java? Pros and Cons? I am looking for comparitive info (speed, space, features) to decide which I should pick. Of course, I will try to search for articles which deal with these topics, but any input based on real world experience would be appreciated. waiting for reply, -- Venkatesh Prasad Ranganath, Dept. Computing and Information Science, Kansas State University, US. web: http://www.cis.ksu.edu/~rvprasad - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]