Re: Validating Data
Date: Fri, 24 Feb 2012 06:41:10 +0000 (UTC)
On Thu, 23 Feb 2012 06:51:33 -0800, ExecMan wrote:
> We have a stored procedure called from a PHP web application. The
> parameters received are of VARCHAR2, but we've seen non-printable
> characters come through, which throw errors.
> If there any type of RegExp of anything I can run to detect if the
> parameter contains non-ascii characters? (Granted, application should
> check this before sending it to the database, but I did not write the
With all due respect, why would you use a database for such thing? Oracle
has regexp functions but PHP as a scripting language, loosely based on
Perl has a really good implementation of a very recent PCRE version.
What you need is here:
The class that you need is [:print:] which includes all printable characters. I imagine that a scripting language, purposely built to be similar Perl, must process characters much faster than a database.Received on Fri Feb 24 2012 - 00:41:10 CST