sonjay - 3:04 pm on Mar 2, 2010 (gmt 0)
You can check the MySQL documentation to find a wildcard/regexp syntax that would allow you to do it in one step. Regexp exists in MySQL, but I don't know the query syntax offhand. But here's one that will do it in two steps:
UPDATE `tblname` SET product_url = replace(product_url, '/directory/desc1-desc2-desc3-', '');
UPDATE `tblname` SET product_url = replace(product_url, '.html', '');
That will first replace all instances of /directory/desc1-desc2-desc3- with nothing. Then it will replace all instances of .html with nothing. Leaving you with just the 'mydesc', 'myproduct', 'myvalue' etc.
Back up first, of course.