> I have a field that will be populated with a first name and a last name, > what I want to do is make sure that the first letter of the first & last > name is uppercase and that all others are lower case. Could someone help > in a reg expression that will do this?
I'm having problems finding ways of detecting/converting case using CF regexes too (doing tags to lowercase for XHTML markup). >From what I've gathered, Perl regexes can do this but CF can't. Bah. There is a Perl-compatible regex parsing extension tag for CF Server at <http://www.rixsoft.com/ColdFusion/CFX/PCRegEx/>, but I've not bothered with this. I'm plodding along with loops and substring extraction fiddliness. Of course all I'm doing is LCase() to certain substrings. Shame there's no Capitalise() CF function. There is something similar at <http://www.cflib.org/udf.cfm?ID=9>, might be of use to you. You could LCase() the whole string, then run it through this UDF. Imagine you could stick a workaround in for hyphenated names too! Let me know if you find any regex solution for dealing with case like this... - Gyrus ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - [EMAIL PROTECTED] work: http://www.tengai.co.uk play: http://www.norlonto.net - PGP key available ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ______________________________________________________________________ Why Share? Dedicated Win 2000 Server · PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER Instant Activation · $99/Month · Free Setup http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists