Why not provide the admin with a drop down of possible date format
options? Choose the 10 or 15 most likely to be used for example.

That way you have absolute control of the string that is passed to the
dateFormat() function while still providing the admin with a choice of
date formats.

Doesn't answer the regex question but I wanted to offer an additional
strategy which could possibly save you some time and frustration.

Chris


-----Original Message-----
From: Jeff D. Chastain [mailto:[EMAIL PROTECTED]] 
Sent: Friday, October 04, 2002 10:28 AM
To: CF-Talk
Subject: RegEx Expression

Rather than my fighting this all afternoon, I figured somebody might
know
regular expressions better than I and be able to come up with a quick
solution.

I have an app where the system admin needs to be able to specify a
custom
date string that will then be fed into the dateFormat() function.   The
sys
admin has the option to use a combination of spaces, special characters,
d,
m, y, etc. to build this date string - i.e. anything allowed for the
standard dateFormat() function.  I need to somehow validate their input
string before I give it to the dateFormat() function though.

Anybody got a quick regex solution to validate this string - or any
other
suggestions?

Thanks
-- Jeff


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Reply via email to