PHP Classes

Word Find, locate surrounding words (phrase) then replace and st

Recommend this page to a friend!

      Top level forums  >  PHP Specialists  >  General  >  Word Find, locate surrounding words...  
Subject:Word Find, locate surrounding words...
Summary:Looking to build out my simple keyword replace function with phr
Messages:1
Author:chris
Date:2012-08-29 14:23:47
Update:2012-08-29 22:04:16
 

  1. Word Find, locate surrounding words...   Reply   Report abuse  
Picture of chris chris - 2012-08-29 22:04:16
Currently I have a scipt to search for keywords and replace with a link, this works well with preg_replace and a large SQL list of words. I want to go a step further and locate my keyword, then look for 2-3 words surrounding it (go to 2 whitespace before and after word), store the results so I can edir, trim or approve found phrases.

I can do averything other than take a keyword, locate it in string, search around it and return values.

Note process time is not an issue as I cache all replaces srings so this is a once run process when i do updates only.

Thanks,
Chris