php-windows Digest 22 Nov 2003 00:43:03 -0000 Issue 2010

Topics (messages 22154 through 22161):

Re: Compiling
        22154 by: Eric COLINET
        22156 by: Alexandre Trevisani
        22159 by: Eric COLINET

Regular Expression Question
        22155 by: Gerardo Rojas
        22157 by: Andrei BEJENARU
        22158 by: Gerardo Rojas

Error parse regular expression for Multi-Edit 9
        22160 by: Vladimir Iahnenco

Re: Console Color problem!
        22161 by: Alex

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 --- Hi,

I have a file with many functions defined for my use in some applications.
How can I compile them so that I can use it as an PHP extension ?  Is that
possible ?

Yes, look at http://www.zend.com/apidoc/ to have more info about it.


Additionnaly you can look at the ext/ sub directories in the PHP sources to have good exemples.

In particular you can use the ext/ext_skel_win32.php script to have a good starting point for writing you extension.


Eric

--- End Message ---
--- Begin Message ---
Thanks a lot.

I´ve seen that all instructions in Zend refer to Linux based compilation, as
well as the source code available in php.net is in Linux file format. Will
it work in Windows ?

"Eric Colinet" <[EMAIL PROTECTED]> escreveu na mensagem
news:[EMAIL PROTECTED]
> Hi,
>
> >I have a file with many functions defined for my use in some
applications.
> >How can I compile them so that I can use it as an PHP extension ?  Is
that
> >possible ?
>
> Yes, look at http://www.zend.com/apidoc/ to have more info about it.
>
> Additionnaly you can look at the ext/ sub directories in the PHP sources
to
> have good exemples.
>
> In particular you can use the ext/ext_skel_win32.php script to have a good
> starting point for writing you extension.
>
>
> Eric

--- End Message ---
--- Begin Message --- Yes, all you need is Visual C++ 6 and the requirements for PHP on Windows (http://www.php.net/manual/en/install.windows.php).



At 17:43 21/11/2003, Alexandre Trevisani wrote:
Thanks a lot.

I´ve seen that all instructions in Zend refer to Linux based compilation, as
well as the source code available in php.net is in Linux file format. Will
it work in Windows ?

"Eric Colinet" <[EMAIL PROTECTED]> escreveu na mensagem
news:[EMAIL PROTECTED]
> Hi,
>
> >I have a file with many functions defined for my use in some
applications.
> >How can I compile them so that I can use it as an PHP extension ?  Is
that
> >possible ?
>
> Yes, look at http://www.zend.com/apidoc/ to have more info about it.
>
> Additionnaly you can look at the ext/ sub directories in the PHP sources
to
> have good exemples.
>
> In particular you can use the ext/ext_skel_win32.php script to have a good
> starting point for writing you extension.
>
>
> Eric

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--- End Message ---
--- Begin Message ---
I have a regular expression, that finds what i want.  The problem lies in that I don't 
want to replace this pattern with another.  I want to prefix the pattern with a 
character.  Any suggestions as to how I might accomplish this?

regular expression = '/^\d\{1,2}\./'


--
Gerardo S. Rojas
mailto: [EMAIL PROTECTED]


--- End Message ---
--- Begin Message ---
Enclose a capturing group (\d) and the use prefix\${1} inside the
replacement.
Check out the PHP manual:

$string = "April 15, 2003";
$pattern = "/(\w+) (\d+), (\d+)/i";
$replacement = "\${1}1,\$3";


"Gerardo Rojas" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
I have a regular expression, that finds what i want.  The problem lies in
that I don't want to replace this pattern with another.  I want to prefix
the pattern with a character.  Any suggestions as to how I might accomplish
this?

regular expression = '/^\d\{1,2}\./'


--
Gerardo S. Rojas
mailto: [EMAIL PROTECTED]

--- End Message ---
--- Begin Message ---
Okay, thanks for pointing that out.  

How do we place multiple Replacements in the $replacement argument to preg_replace?  
I've added a double capture on my regular expression.  If it is matched then I replace 
the the matched pattern by prefix a single character the the value of ${1} from the 
captured pattern.  I have found out that I may need a second expression to capture all 
of the items in the file

<snip>

$aStr = array();
$aPat = array();
$aSum = array();

$aStr[] = "1. This is my first Qna";
$aStr[] = " 1. This is my first Qna";
$aStr[] = "11. This is my first Qna";

$aPat[] = "/(^\d{1,2}\.)|(^\s\d{1,2}\.)/";
$aPat[] = "/(^\d{1,2}\.)|(^\s\d{1,2}\.)/";
$aPat[] = "/(^\d{1,2}\.)|(^\s\d{1,2}\.)/";

****problem is here
$rep = "Q\${1}, ${2}";

$aSum = preg_replace($aPat, $rep, $aStr);
echo "<P>";

foreach( $aSum as $s )
{       
        echo "string = $s <BR>";
}

--
Gerardo S. Rojas
mailto: [EMAIL PROTECTED]


-----Original Message-----
From: Andrei BEJENARU [mailto:[EMAIL PROTECTED]
Sent: Friday, November 21, 2003 9:50 AM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Re: Regular Expression Question


Enclose a capturing group (\d) and the use prefix\${1} inside the
replacement.
Check out the PHP manual:

$string = "April 15, 2003";
$pattern = "/(\w+) (\d+), (\d+)/i";
$replacement = "\${1}1,\$3";


"Gerardo Rojas" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
I have a regular expression, that finds what i want.  The problem lies in
that I don't want to replace this pattern with another.  I want to prefix
the pattern with a character.  Any suggestions as to how I might accomplish
this?

regular expression = '/^\d\{1,2}\./'


--
Gerardo S. Rojas
mailto: [EMAIL PROTECTED]

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--- End Message ---
--- Begin Message ---
Hi All,
Attached php.exe to the list of multi-edit 9 compilers.
Does anybody has the php error parse regular expression string?

-- 
Best regards,
Vladimir
---
mailto: [EMAIL PROTECTED]

--- End Message ---
--- Begin Message ---
Hello ALL!
I've installed Console Color package from PEAR and tied to use it.
I got just ANSI colors in form of text like: <-[34m Hello <-[0m
Where could be the problem? Some time ago I used similar package in
Perl and it worked fine.

Best regards,
 Alex

--- End Message ---

Reply via email to