> (REGEXP).
>
> I have a text field that contains some plain text intermingled with html
> tags.  In querying the database, if the keyword I'm searching for falls
> within the plain text, that record should be returned.  However, if the
> keyword falls within an html tag, it should not be returned.  Could somebody
> assit me in putting such a regular expression query together?
>
> Any assistance would be greatly appreciated...  thanx!
>
database, query

        bonjour,

SELECT fields from my_table WHERE my_field not regexp '^.*\<.+\>.*$';
^ for searching at beginning of string
\< for searching <
.* searches anything or nothing
.+ searches one carachter at least
\> searches >
$ means end of string

or simply: ...not regexp '\<.+\>';
it depends of the importance of the html tags's position in your query.
if you mean html tag = <html_tag>
and if i do understand what you mean with my poor english...

jean-michel


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to