Try looking for search engine scripts - they have this feature very
simple.
--
Maxim Maletsky
[EMAIL PROTECTED]
BAROILLER Pierre-Emmanuel [EMAIL PROTECTED] wrote... :
Hi!
does someone know how to find an exact word in a content with html tags ?
I'm using a regexp like this :
Which functions are you using to do the regex stuff...
That might help...also check out...
On Thu, 2002-11-07 at 15:42, BAROILLER Pierre-Emmanuel wrote:
Hi!
does someone know how to find an exact word in a content with html tags ?
I'm using a regexp like this :
$searchRegEx =
I work with
preg_match_all to get all matching words
and preg_replace_callback to replace found sentences...
before runing the php pass, I take results from a mysql table
with a query like this : select * from mytable where content REGEXP
'[[::]]theword[[::]]
But... I can't get all
This should help u out...
http://www.php.net/manual/en/pcre.pattern.modifiers.php
On Thu, 2002-11-07 at 18:29, BAROILLER Pierre-Emmanuel wrote:
I work with
preg_match_all to get all matching words
and preg_replace_callback to replace found sentences...
before runing the php
How about this one,
$word_search = 'blablabla' ;
echo eregi_replace(($word_search),b\\1/b,$html) ;
//
- Original Message -
From: BAROILLER Pierre-Emmanuel [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, November 08, 2002 2:42 AM
Subject: [PHP] regular expression and exact word
Try this... it should only print out Some webpage data
$text =
script somethingscript data./script
Some webpage data
script somethinganother script data /script
;
print preg_replace('/script (.*?)/script(.*?)\/script/',
'', $text);
Ando Saabas wrote:
Ok let me explain my problem further
the best you can do is:
?php
$a = this has php in the string;
if( ! ereg(php, $a ) )
{ print a: not in string; }
$a = this has in the string;
if( ! ereg(php, $a ) )
{ print b: not in string; }
?
-Original Message-
From: Ando Saabas [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 14,
Ok let me explain my problem further some. I need the regular expression to
purify the html page from script tags:
I used: $file = eregi_replace((script(.*).*/script), , $file);
Now this works fine, until theres a webpage like:
script somethingscript data./script
Some webpage data
script
At 05:52 PM 3/14/2002 +0200, Ando Saabas wrote:
Ok let me explain my problem further some. I need the regular expression to
purify the html page from script tags:
I used: $file = eregi_replace((script(.*).*/script), , $file);
Now this works fine, until theres a webpage like:
script
9 matches
Mail list logo