[5825] in java-interest

home help back first fref pref prev next nref lref last post

Re: Reposting.... Help with REGEX??

daemon@ATHENA.MIT.EDU (dave collier)
Wed Feb 28 16:24:07 1996

Date: Wed, 28 Feb 1996 11:28:46 -0800
To: "Rael J. Dornfest" <quark@hopf.dnai.com>, java-interest@java.sun.com
From: dc@symbolicsoft.com (dave collier)

hi reposter!

java is pretty much like c syntax, so don't think there are any things
built into the lang for parsing dates.

There is a special class for URLs, that checks validity:

  try {
      myurl = new URL("http://blah.com")
  } catch (MalormedURLException e)    {
      System.out.println("malformed url error!");
  }


Java also has a built in string class, so that makes things a lot easier than c:

str = new String("fred");
str = str + " flintstone";


What you need sounds like something a lot of other people could use too,
maybe there's a thrid party class out there, or you could be the man to
make one - but not being a perlhead, might i suggest something using the
roman alphabet this time ;-) ?

dc

At 1:25 AM 2/28/96, Rael J. Dornfest wrote:
>This is a reposting....
>
>I wonder if someone could help me out with a pointer to some instructions,
>man pages, or enlightening source.  I do most of my work in Perl5 and have
>been leary of delving into regular expressions in Java.
>
>How, for example would you check for a valid DATE entry?
>
>ie.   $true = m#^\\(?\\d{3}\\)?[-\. ]\\d{3}[-\. ]\\d{4}$#;
>
>Any help would be greatly appreciated.
>
>Rael
>
>-
>This message was sent to the java-interest mailing list
>Info: send 'help' to java-interest-request@java.sun.com

___________________________________________________________________

     /\    dave 'dc' collier
    /_/\     Symbolic Software, Inc.
   /_\_ \      dc@SymbolicSoft.com
  /___/__\       tel (415) 546 1295

      use your Head or lose your Mind!  http://www.BurnCycle.com


-
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.com

home help back first fref pref prev next nref lref last post