Re: Have any idea about regular expression ?

From: Mo/G&G (mo_at_naggama.co.kr)
Date: 10/08/03


Date: Wed, 8 Oct 2003 09:46:39 +0900

Thanks Matthias

It works perfect.
$aaa = preg_replace("/((<[^>]*)|\d)/e", '"\2"=="\1"? "\1":"0"', $sentence);

Thanks again

Regards,
Mo

"Matthias Esken" <muelleimer2003nospam@usenetverwaltung.org> wrote in
message news:blv47q.1l0.1@usenet.esken.de...
> "Mo" <mo@naggama.co.kr> schrieb:
>
> > Have any idea about regular expression ?
> >
> > I posted this question to other newsgroup, but I'm still hungry for it.
> >
> > I tried to change any numeric characters to Zero like following;
> > $aaa = ereg_replace ("|0-9|", "0", $sentence);
> > This seems working perfect.
> >
> > My question is how I can do this function only for outside of html tags.
> > I don't want any numeric characters to be changed inside html tags.
>
> Give it a try - I didn't try it myself. :-)
>
> | $aaa = preg_replace("/((<[^>]*)|\d)/e", '"\2"=="\1"? "\1":"0"',
$sentence);
>
> Regards,
> Matthias



Relevant Pages

  • Have any idea about regular expression ?
    ... I posted this question to other newsgroup, but I'm still hungry for it. ... My question is how I can do this function only for outside of html tags. ... I don't want any numeric characters to be changed inside html tags. ...
    (comp.lang.php)
  • Re: high cpu utilization with WINS running
    ... Best regards ... This newsgroup only focuses on SBS technical issues. ... When opening a new thread via the web interface, we recommend you check ... you may want to contact Microsoft CSS directly. ...
    (microsoft.public.windows.server.sbs)
  • Re: Text search fails
    ... > regards, Ger. ... >> Thank you for posting in the SBS newsgroup. ... >> Microsoft.public.sqlserver.fulltext newsgroup. ... >> Windows SharePoint Services on a Windows Small Business Server ...
    (microsoft.public.windows.server.sbs)
  • RE: Shared Fax Error (SBS 2000)
    ... > please feel free to post back to this Newsgroup. ... > Best regards, ... > This newsgroup only focuses on SBS technical issues. ... you may want to contact Microsoft CSS directly. ...
    (microsoft.public.windows.server.sbs)
  • Re: RWW and Session State
    ... > Hi Dave, ... > Best regards, ... > This newsgroup only focuses on SBS technical issues. ... you may want to contact Microsoft CSS directly. ...
    (microsoft.public.windows.server.sbs)