Re: [PHP] regular expression and exact word search...

2002-11-07 Thread Maxim Maletsky
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 :

Re: [PHP] regular expression and exact word search...

2002-11-07 Thread .: B i g D o g :.
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 =

Re: [PHP] regular expression and exact word search...

2002-11-07 Thread BAROILLER Pierre-Emmanuel
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

Re: [PHP] regular expression and exact word search...

2002-11-07 Thread .: B i g D o g :.
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

Re: [PHP] regular expression and exact word search...

2002-11-07 Thread rija
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

Re: [PHP] regular expression for (NOT 'word')

2002-03-16 Thread scott furt
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

RE: [PHP] regular expression for (NOT 'word')

2002-03-14 Thread Rick Emery
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,

Re: [PHP] regular expression for (NOT 'word')

2002-03-14 Thread Ando Saabas
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

Re: [PHP] regular expression for (NOT 'word')

2002-03-14 Thread Michael Sims
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