php-windows Digest 16 Jan 2007 16:22:07 -0000 Issue 3114
Topics (messages 27386 through 27389):
Re: COM surgery
27386 by: bedul
Re: Ereg problems
27387 by: Niel Archer
27388 by: Niel Archer
27389 by: Beauford
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 ---
----- Original Message -----
From: "gunawan" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Tuesday, January 16, 2007 11:57 AM
Subject: COM surgery
> i read the com and interested using in my program..
> but the help (php manual chm) don't give what i need
> example :
> $word = new COM("word.application") or die("Unable to instantiate Word");
> echo "Loaded Word, version {$word->Version}\n";
>
> metods:
> $obj = new COM("Application.ID");
> what i want to build nextt is not a main problem right now, what i want to
> ask was about how many Aplication.id able to receive by this com
> i have only:
> 1. word.application
> 2. ADODB.Connection
> 3. excel.application
> are there any application.id ??
>
>
--- End Message ---
--- Begin Message ---
Hi
> I want to allow the following: a to z, A to Z, 0 to 9, and "_-'" (without
> the double quotes) and spaces. I have now been screwing around with this for
> over 8 hours. There are other issues as well that has been compoudning this,
> but this would be a great start to solving my issue.
I don't use ereg (prefer preg_match) but unless the regex syntax is
greatly different try: "$[\w'-]+$"
Niel
--- End Message ---
--- Begin Message ---
Oops that should be "^[\w'-]+$"
Niel
--- End Message ---
--- Begin Message ---
Nope, doesn't work for me. I think what I'm trying to do must not be
possible. I've been at this for two days now. I changed yours to this - ereg
("([0-9][A-Z][a-z][-_.'\ ])" but it always says that it is invalid. The
last one after the slash is supposed to be a space - I have to have a space.
I don't need a length.
> -----Original Message-----
> From: bedul [mailto:[EMAIL PROTECTED]
> Sent: January 15, 2007 11:48 PM
> To: Beauford
> Subject: Re: [PHP-WIN] Ereg problems
>
> <?
> $nlong=strlen($username);
> if(ereg ("([0-9][A-Z][a-z][_-]{$nlong})", $username){
> echo "allowed";
> }else{
> echo "disallowed";
>
> }
>
> //taken from ereg help
> /*
> if (ereg ("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})", $date, $regs)) {
> echo "$regs[3].$regs[2].$regs[1]";
> } else {
> echo "Invalid date format: $date";
> }
> */
> ?>
>
> ----- Original Message -----
> From: "Beauford" <[EMAIL PROTECTED]>
> To: <[email protected]>
> Sent: Tuesday, January 16, 2007 10:59 AM
> Subject: [PHP-WIN] Ereg problems
>
>
> > Hi,
> >
> > Without getting into a long drawn out discussion, can
> anyone show me a
> > way to validate a string that is input from a form.
> >
> > I want to allow the following: a to z, A to Z, 0 to 9, and "_-'"
> > (without the double quotes) and spaces. I have now been screwing
> > around with this
> for
> > over 8 hours. There are other issues as well that has been
> compoudning
> this,
> > but this would be a great start to solving my issue.
> >
> > Thanks
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/) To
> unsubscribe, visit:
> > http://www.php.net/unsub.php
> >
>
>
>
--- End Message ---