On 10/30/07, Zoltán Németh <[EMAIL PROTECTED]> wrote:
> 2007. 10. 29, hétfő keltezéssel 11.17-kor Daniel Brown ezt írta:
> > On 10/29/07, Zoltán Németh <[EMAIL PROTECTED]> wrote:
> > > hi list,
> > >
> > > I have this code:
> > [snip!]
> > > Parse error: syntax error, unexpected '@'
> > > in /home/znemeth/public_html/test/pregreplacetest1.php(94) : regexp code
> > > on line 1
> > >
> > > Fatal error: preg_replace() [<a
> > > href='function.preg-replace'>function.preg-replace</a>]: Failed
> > > evaluating code: [EMAIL PROTECTED]
> > > in /home/znemeth/public_html/test/pregreplacetest1.php on line 94
> > [snip=again!]
> >
> >     Zoltan,
> >
> >     If you're using preg_replace(), where are your start and stop
> > characters for the pattern and subject?
> >
> >     $szoveg = preg_replace('/'.$mit.'/','/'.$mire.'/',$dokumentum);
>
> $mit and $mire are arrays. $mit contains all the patterns, they all
> start and end with /
> $mire contains all the replacements.
>
> >
> >     You could otherwise try ereg_replace(); without the slashes, or do
> > an htmlentities($dokumentum);.
>
> ereg_replace cannot take arrays as arguments...
> htmlentities might work but then all my patterns containing < or > has
> to be modified - and then it might replace strings which I don't want to
> get replaced. e.g. &lt;script&gt; might be a legal string which I don't
> want to replace, but I want to replace <script>
>
> greets
> Zoltán Németh
>
> >
> > --
> > Daniel P. Brown
> > [office] (570-) 587-7080 Ext. 272
> > [mobile] (570-) 766-8107
> >
> > Give a man a fish, he'll eat for a day.  Then you'll find out he was
> > allergic and is hospitalized.  See?  No good deed goes unpunished....
> >
>
>

    This was one of those things where I skimmed it too quickly
without really reading it.  Sorry, deadlines have only been allowing
me an average of about two hours of sleep per night.... don't mind me.

-- 
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

Give a man a fish, he'll eat for a day.  Then you'll find out he was
allergic and is hospitalized.  See?  No good deed goes unpunished....

Reply via email to