php-windows Digest 10 Feb 2002 12:15:50 -0000 Issue 994
Topics (messages 11944 through 11947):
Console, colors and stuff
11944 by: Richard
11945 by: Alan McFarlane
11946 by: Richard
Re: Checking email
11947 by: Marko Mihalec
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
Hey Boys,
I'm using PHP CGI version on Win32 to write some scripts. Not for a website
or anything, just some scripting at the console window. So now I want to
change the text color, clear the screen, and the other usual stuff. Just
like I can do with ncursus on the Linux version of PHP. Only, I can't find
something similar on Win32. It's pretty boring this way. Does anyone know
how to do it?
Richard
--- End Message ---
--- Begin Message ---
Try 'echo'ing ansi control sequences?
--
Alan
Richard <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hey Boys,
>
> I'm using PHP CGI version on Win32 to write some scripts. Not for a
website
> or anything, just some scripting at the console window. So now I want to
> change the text color, clear the screen, and the other usual stuff. Just
> like I can do with ncursus on the Linux version of PHP. Only, I can't find
> something similar on Win32. It's pretty boring this way. Does anyone know
> how to do it?
>
> Richard
>
>
--- End Message ---
--- Begin Message ---
I thought about it, but in Windows 2000 and NT, you can't use ansi.sys from
Win32 executables, only from Dos16 exe's.
Richard
"Alan McFarlane" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Try 'echo'ing ansi control sequences?
>
> --
> Alan
>
> Richard <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Hey Boys,
> >
> > I'm using PHP CGI version on Win32 to write some scripts. Not for a
> website
> > or anything, just some scripting at the console window. So now I want to
> > change the text color, clear the screen, and the other usual stuff. Just
> > like I can do with ncursus on the Linux version of PHP. Only, I can't
find
> > something similar on Win32. It's pretty boring this way. Does anyone
know
> > how to do it?
> >
> > Richard
> >
> >
>
>
--- End Message ---
--- Begin Message ---
function isEmailInvalid($val)
{
// regex for email validation
$pattern =
"/^([a-zA-Z0-9])+([\.a-zA-Z0-9_-])*@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-]+)+/";
// match?
if(preg_match($pattern, $val))
{
return 0;
}
else
{
return 1;
}
}
--- End Message ---