Results 1 to 2 of 2
Threaded View
-
16th Jan 2011, 01:46 PM #1OPMemberWebsite's:
maxneeds.infopreg_replace first half of matches ?
Hi !
I was wondering if it is possible to replace the first half of matches using only preg_replace ?
Like i have
Code:[img=some1] [img=some2] [img=some3] [img=some4]
PHP Code:$pattern='(\[img=(.*?)\])';
$test=preg_replace($pattern,'replaced',$test);
echo $test;
Code:[img=replaced] [img=replaced] [img=replaced] [img=replaced]
Code:[img=replaced] [img=replaced] [img=some3] [img=some4]
Porsche_maniak Reviewed by Porsche_maniak on . preg_replace first half of matches ? Hi ! I was wondering if it is possible to replace the first half of matches using only preg_replace ? Like i have Rating: 5
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Preg_replace help
By Gavo in forum Web Development AreaReplies: 3Last Post: 25th Sep 2012, 07:23 PM -
Replace with Dynamic variable in preg_replace
By MarPlo in forum Web Development AreaReplies: 2Last Post: 21st Feb 2012, 08:36 AM -
Wordpress title preg_replace
By energyboost in forum WordpressReplies: 2Last Post: 3rd Oct 2011, 11:47 PM -
Lulzimg preg_replace help
By masterb56 in forum Web Development AreaReplies: 2Last Post: 15th Aug 2011, 06:31 PM -
Brodcasting Matches , allowed by google ads ?
By NightMare in forum General DiscussionReplies: 2Last Post: 1st Apr 2011, 03:49 PM
themaManager - edit and manage...
Version 4.22 released. Open older version (or...