-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tuesday 11 May 2004 07:13 pm, QuickBrownFox wrote:
> The more I think about it, the more I like the idea of changing it to 24
> hour format first anyway, but then I need to verify the format first,
> and extract the hours and AM|PM before I can change it from 12 to 24.

Well, as much as people know I'm a fan of regex, I would suggest looking for a 
date type library.  Since you mention you are using PHP I can't help you much 
there, but I'm sure there are some that will take a date in the format you 
have, and already do the parsing/validation, and should make it easy to play 
with.  Any of the php folks able to recommend a good one in this spot?

> P.S.  What's the difference between \s and \W?  \w refers to any word
> character, and so it seems everything else (i.e. \W) is whitespace.  So
> then what is \s?  I'm so confused.... :-P

\W is the negative form of \w
\w is word characters (alphanumeric, based on locality).  so non alphanumeric.
Rule of thumb, small letter is a class, capital is the negative.

Now, that is in Perl, and should be in PHP also (except the locality, last I 
*heard* PHP didn't support the l10n, please inform me if this has changed).

- -- 
- --
Jayce^
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAoYPkA10/0O8cAHgRAoVNAKCeJ67Pq8/YmU3Ioc+IJyfqgdvGmgCePUGl
t79mw29rlZEp7xQiEZhswt8=
=h1BQ
-----END PGP SIGNATURE-----

____________________
BYU Unix Users Group
http://uug.byu.edu/
___________________________________________________________________
List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list

Reply via email to