Re: [PHP] eregi_replace driving me nuts

2004-07-09 Thread Matt M.
> What I'm trying to do: > > I'm trying to have the proper variables for the eregi_replace so that each > word in the $dico array is replaced by a link to its definition respecting > the following rules : > -only exact match makes a link to the definition, for example : > - "abaisseraient" do

Re: [PHP] eregi_replace driving me nuts

2002-07-09 Thread Chris Shiflett
In a weak attempt at improving my knowledge of regular expressions, I came up with a less elegant solution than Dan's. :-) $os=eregi_replace("Win([^0-9NT]*)", "Windows \1" $os); This adds some additional handy replacements, such as: Winblows98 -> Windows 98 Windoze98 -> Windows 98 It's a dece

Re: [PHP] eregi_replace driving me nuts

2002-07-09 Thread Analysis & Solutions
On Tue, Jul 09, 2002 at 10:40:33PM -0500, Chris Shiflett wrote: > Patrick Teague wrote: > > >$os = eregi_replace( "Win[^dows]", "Windows ", $os ); > > I'm pretty sure (I'm not a regular expression expert) this matches "a > string that begins with Win followed by a character that is not d, o, w,

Re: [PHP] eregi_replace driving me nuts

2002-07-09 Thread Chris Shiflett
Patrick Teague wrote: >For some reason the following line is not behaving > >$os = eregi_replace( "Win[^dows]", "Windows ", $os ); > I'm pretty sure (I'm not a regular expression expert) this matches "a string that begins with Win followed by a character that is not d, o, w, or s. Thus, in th