Re: [PHP] EREGI_REPLACE? HELP!!!

2005-01-20 Thread Greg Donald
On Thu, 20 Jan 2005 11:19:10 -0600, Kiason Turner <[EMAIL PROTECTED]> wrote: > I'm trying to take a string and remove all "invalid characters" from it. > > $string="Frid#ays are@ re$ally G{}[]RE~AT. F*rid<>ay at 5 is be^tt&er."; > > The only characters that should be allowed are A-Z, a-z, 0-9, >

RE: [PHP] EREGI_REPLACE? HELP!!!

2005-01-20 Thread Chris W. Parker
Kiason Turner on Thursday, January 20, 2005 9:19 AM said: > I'm trying to take a string and remove all "invalid characters" from > it. > > $string="Frid#ays are@ re$ally G{}[]RE~AT. F*rid<>ay at 5 is > be^tt&er."; > Any ideas? Your help is appreciated. What have

[PHP] EREGI_REPLACE? HELP!!!

2005-01-20 Thread Kiason Turner
I'm trying to take a string and remove all "invalid characters" from it. $string="Frid#ays are@ re$ally G{}[]RE~AT. F*rid<>ay at 5 is be^tt&er."; The only characters that should be allowed are A-Z, a-z, 0-9, .(period), -(dash), ;(semi-colon), and :(colon). All other characters should be removed.

Re: [PHP] eregi_replace help needed

2004-01-29 Thread memoimyself
Hi Nico, On 29 Jan 2004 at 17:52, [EMAIL PROTECTED] wrote: > I want to locate patterns such as > > 12345678 > 1 23 45 67 89 > 1 2 34 567 890 > > and replace the pattern string with a new string. > > I tried > > $filter['message'] = eregi_replace("[0-9\s]{4,}",'', > $filter['message']); Use

RE: [PHP] eregi_replace help needed

2004-01-29 Thread php4
Hi, the "off the top of your head" was perfect. It is contrary to everything I've read on this, but it did the trick. >off the top of my head, I don't think '\s' is valid in a character >class, so just use ' ' instead >try eregi_replace("[0-9 ]{4,}" >-Craig Thanks Nico -- PHP General Mai

RE: [PHP] eregi_replace help needed

2004-01-29 Thread craig
> -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: January 29, 2004 8:53 AM > To: [EMAIL PROTECTED] > Subject: [PHP] eregi_replace help needed > > > Hi, > > I want to locate patterns such as > > 12345678 > 1 23 45

[PHP] eregi_replace help needed

2004-01-29 Thread php4
Hi, I want to locate patterns such as 12345678 1 23 45 67 89 1 2 34 567 890 and replace the pattern string with a new string. I tried $filter['message'] = eregi_replace("[0-9\s]{4,}",'', $filter['message']); but it does not work on all the above examples. Thanks for the assistance! Nico -

Re: [PHP] eregi_replace help

2002-10-07 Thread Jennifer Swofford
Thank you Marco! Between your post and the other stuff I happened to find at the same time, I got it working. Turned out I was making it much more difficult than it had to be. I ended up with: http://www.blah.com/$4.$6\"";, $contents); echo $contents; fclose ($fd); ?> Lo and behold, it works

Re: [PHP] eregi_replace help

2002-10-07 Thread Marco Tabini
Jennifer-- A couple of things. eregi_replace does not have a limitation parameter, which means that if you use it *all* the strings that match your pattern will be replace with the new pattern. In your case, if I read your code correctly (and I may not--I'm doing this from memory), the eregi repl

Re: [PHP] eregi_replace help

2002-10-07 Thread Jennifer Swofford
BTW - I have found errors in the regular expression that I was matching so don't bother to point those out. ;) That shouldn't affect the nature of the problem I was asking about. --- Jennifer Swofford <[EMAIL PROTECTED]> wrote: > Hello all, > > I am trying to use php to read through an html fil

[PHP] eregi_replace help

2002-10-07 Thread Jennifer Swofford
Hello all, I am trying to use php to read through an html file and replace all image paths, like such: Change "images/firstimage.gif" to "http://www.blah.com/firstimage.gif"; ... Change "somesuch/images/secondimage.jpg" to "http://www.blah.com/secondimage.jpg"; So I am going through the file an

[PHP] eregi_replace HELP!!

2002-02-04 Thread Martin Cabrera Diaubalick
Hello all! I would like to change all the links containing string "microsite" from $contenido1 to: http://www.whatever.com";>Link not available. The rest of the links of $contenido1 would have to be ontouched. To do this, I tried $contenido1=eregi_replace("()","http://www.whatever.com\";>L

[PHP] eregi_replace help!

2001-12-05 Thread David
Hi, I have a rather annoying eregi_replace which I can't get to work. I have a string, $page which contains a webpage. In the page links are denoted like so: ###LINK###Link Name###URL or Section###ELINK### There are a number of these in $page. I need to use eregi_replace() to replace the above s