Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Please help eregi_replace pattern.
Old 09-09-2009, 10:58 AM Please help eregi_replace pattern.
fansite's Avatar
Novice Talker

Posts: 8
Name: Fansite
Trades: 0
Hi I'm not professional in PHP and I have some ploblem with eregi_replace function.

$A = "This is a dog and this <is> a cat";

I want to find and replace "is" to some text but not want to replace any word in the tag <>

Before I use:
$A = eregi_replace("(is)", "", $A);

Example: (I want to replace "" from "is")

$A = "This is a dog and this <is> a cat";

I want => "This a dog and this <is> a cat"
But not => "This a dog and this <> a cat"

Any one can help, Thank for any reply
__________________

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
fansite is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 09-09-2009, 11:02 AM Re: Please help eregi_replace pattern.
mgraphic's Avatar
Truth Seeker

Latest Blog Post:
JAMISONTUNES
Posts: 2,898
Name: Keith Marshall
Location: Connecticut
Trades: 0
Pattern: '<{0}is>{0}' (not tested)
__________________

<mgraphic /> - I don't have a solution but I admire the problem.
mgraphic is offline
Reply With Quote
View Public Profile
 
Old 09-09-2009, 09:39 PM Re: Please help eregi_replace pattern.
Knight13's Avatar
Defies a Status

Posts: 10,285
Name: Knight13
Location: Cleveland, Ohio
Trades: 0
eregi_replace has been deprecated, it is not good to use that function anymore.
Knight13 is offline
Reply With Quote
View Public Profile
 
Old 09-09-2009, 09:49 PM Re: Please help eregi_replace pattern.
mgraphic's Avatar
Truth Seeker

Latest Blog Post:
JAMISONTUNES
Posts: 2,898
Name: Keith Marshall
Location: Connecticut
Trades: 0
Quote:
Originally Posted by Knight13 View Post
eregi_replace has been deprecated, it is not good to use that function anymore.
Your right, as in the release of PHP 6, it has been disabled by default.
__________________

<mgraphic /> - I don't have a solution but I admire the problem.
mgraphic is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Please help eregi_replace pattern.
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.26168 seconds with 12 queries