Re: Need method to disallow special characters
Posted in 1998
Tony, Phillips wrote: > > Has anyone created a way to handle special characters (like single/double > quotes, asterisk, question marks, slashes, etc.) from being entered in certain > key fields? The problem mostly arises when ASCII files are created from columns > that contain these special characters. I know I could create a library function > that could parse an entry char by char, but I was just wondering if there was > any other method somebody out there has successfully implimented. > > Thanks. You don't say what language but, assuming 4GL, try: if (s matches "*[,;:@]*") then error "I don't like those characters" end if -- Peter Lancashire Information Systems Specialist, Bayer plc Eastern Way, Bury St Edmunds, Suffolk, IP32 7AH, UK Tel: +44-1635-562258, Fax: +44-1635-562281 Mail: Peter.Lancashire.PL1@bayer.co.uk --- My Internet plumbing does not allow me to mail and post news together. Sorry. All opinions are my own and not those of Bayer plc. --- Join Infuse, the UK Informix User Group at http://www.infuse.co.uk/