The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
June 2000



This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.


regular expressions in java?

Posted by Linda Kao on June 29, 2000 at 6:52 PM

Is there the equivalent in Java, of C/Unix regular expressions? We are rewriting legacy C code in Java. In the C code we kept complex rules on formatting fields in a regular expression and then it was very easy to check if the field value was valid because we called regexp.

Example: Something in the format of DD:MM:SS.SSS N/S
would be described in the regular expression as

Then it's just a matter of calling regcomp to compare input with the regular expression. Is there an equivalent in Java?

Thanks in advance!

  • regx john petri July 01, 2000 at 10:44 AM (0)

Sponsored Links

Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us