Re: Regular expressions (regex) question for parsing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Dec 22, 2008 at 15:56, Rene Fournier <renefournier@xxxxxxxxx> wrote:
>
> Each line should start with a $dollar sign, then some arbitrary text, ends
> with a percent sign, followed by carriage-return and line-feed. Sometimes
> though, the final line is not complete. In that case, I want to save those
> lines too.

    Just a quick note on that, Rene....

> $result = array (       "matches" =>
>                array ( 0 => "$sometext %\r\n",

    If you want to have the dollar sign included, use single quotes.
Double-quoted things translate the data enclosed within them, so
"$sometext" would translate that into the value of the variable (or
null with E_NOTICE if it's uninstantiated/undefined).  Conversely,
'$sometext' would be the literal $sometext.

-- 
</Daniel P. Brown>
daniel.brown@xxxxxxxxxxxx || danbrown@xxxxxxx
http://www.parasane.net/ || http://www.pilotpig.net/
Unadvertised dedicated server deals, too low to print - email me to find out!

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux