URL regex search and replace on MySQL (in WordPress)

Posted by Tal Galili on Stack Overflow See other posts from Stack Overflow or by Tal Galili
Published on 2010-04-06T07:46:43Z Indexed on 2010/04/06 7:53 UTC
Read the original article Hit count: 536

Hello all,

I have a WordPress blog with numerous URL's I wish to replace from this:

http://www.oldwebsite.co.il/name/*.asp

To this:

http://www.newwebsite.com/?p=*

For example, from this:

http://oldwebsite.co.il/name/65971.asp

To this:

http://www.newwebsite.com/?p=65971

I believe the following plugin: http://urbangiraffe.com/plugins/search-regex/ will do the trick with regex, but I am looking for the correct regex to use here.

I found this stackoverflow thread that has a similar task, but since I am not too apt with regex, I was hoping for help so I don't mess anything up.

Thanks,

Tal After searching stackoverflow, I found

© Stack Overflow or respective owner

Related posts about Wordpress

Related posts about regex