需要添加通配符来更改数据库中文档的URL位置

This is my first time here and posting. If I haven't done something quite right in formatting my question or communication, please let me know and so I can correct it in the future.

I have been pretty good at working inside the database until now. I need to do a search replace on this:

UPDATE wp_posts SET 'post_content' = REPLACE ('post_content', 'http://somedomain.com/12345/678/910/.doc', 'http://newdomain.com/newfolder/.doc');

Change the URLs in the content area of the WP post so that they stop pointing to the old location but to the new folder which is where I uploaded the new docs. I think I need a wildcard or something in there were the numbers are because the numbers of the file folders will be different. The docs aren't in the same file folders. I tried using and asterisk (*) in place of the numbers but it didn't work. Can someone help me with the proper string I need to use? The outcome should just be that all URLs for the docs be changed to the new folder location. Thanks in advance.

Which database are you using?

Just add back slash '\' before asterisk (*) .

Try below code:

UPDATE wp_posts SET 'post_content' = REPLACE ('post_content', 'http://somedomain.com/12345/678/910/\*.doc', 'http://newdomain.com/newfolder/\*.doc');