Posted by Philip Ronan on 10/29/54 11:33
"Raj" wrote:
> "Philip Ronan" <invalid@invalid.invalid> wrote in message
> news:BFB37AB7.3BC85%invalid@invalid.invalid...
>>
>> Try $values['\1'] instead of $values[\\1]. Looks OK otherwise.
>
> Thanks Phil, however it still does not do the replacement. Is there an easy
> way I can print the value of the match? and does the replace function
> substitue greedily? i.e. will it replace all three placeholders on on line?
I just noticed you're also using unquoted text in the $values declarations.
Change $values[pic1] to $values['pic1'], etc. You should also put this line
at the beginning of your script:
error_reporting(E_ALL);
That will help you find any other mistakes. You don't need to worry about
greedy matches because \S will stop matching at the first space character.
--
phil [dot] ronan @ virgin [dot] net
http://vzone.virgin.net/phil.ronan/
[Back to original message]
|