Strip the HTML on insert and store the plain text in a separate field. Then create a fulltext index on it (if you're using MyISAM tables), and do your searches against that plaintext field.
cheers, barneyb On 5/16/05, Sebastian Mork <[EMAIL PROTECTED]> wrote: > Hi, > > I've a problem. > In a mysql-db I've a table where some html-content is stored. > > Now, I want to provide a search function that searches in these fields. > > But how can I tell mysql (using a regEx-pattern) to except tags in the > search. > > I think of doing something like this > select > tbl_name.fld_name as test > where > replace(tbl_name.fld_name, '<[^>]*>', '') like '%#mySearchString#%' > > but the mysql-replace-function does not accept regular expressions.. > hmm, has anybody an idea? > > -- > Sebastian Mork <[EMAIL PROTECTED]> -- Barney Boisvert [EMAIL PROTECTED] 360.319.6145 http://www.barneyb.com/ Got Gmail? I have 50 invites. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:206773 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

