Title: [plugin: Redirection] replacement regex?
Last modified: August 19, 2016

---

# [plugin: Redirection] replacement regex?

 *  [alchemistGM](https://wordpress.org/support/users/alchemistgm/)
 * (@alchemistgm)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/plugin-redirection-replacement-regex/)
 * I’ve not been able to find an example of the types of regex the redirection plugin
   uses in the replacement string.
 * trying to use one rule in the plugin (not htaccess) to fix a spelling error across
   15 URL’s, I have regex box turned on, and:
    ^(.*)lonliness(.*)$
 * to be replaced by
    $1loneliness$2
 * but that fails, giving me results like /experiencing-/loneliness/-during-the-
   holidays/
    (Note the unwanted added slash before and after loneliness). Does 
   anyone know how to prevent the $1$2 etc from adding a slash whereever I do my
   backreference?
 * [http://wordpress.org/extend/plugins/redirection/](http://wordpress.org/extend/plugins/redirection/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Felipe Figueroa](https://wordpress.org/support/users/amenadiel/)
 * (@amenadiel)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/plugin-redirection-replacement-regex/#post-1878186)
 * try
    /(.*)lonliness(.*) to /$1loneliness$2
 *  [idansh](https://wordpress.org/support/users/idansh/)
 * (@idansh)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/plugin-redirection-replacement-regex/#post-1878289)
 * how do I change the URLs to lowercase characters (problem with escaped URLs).
   I need to pass the URLs to wordpress as lower case instead of uppercase.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘[plugin: Redirection] replacement regex?’ is closed to new replies.

 * ![](https://ps.w.org/redirection/assets/icon-256x256.jpg?rev=983639)
 * [Redirection](https://wordpress.org/plugins/redirection/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/redirection/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/redirection/)
 * [Active Topics](https://wordpress.org/support/plugin/redirection/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/redirection/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/redirection/reviews/)

 * 2 replies
 * 3 participants
 * Last reply from: [idansh](https://wordpress.org/support/users/idansh/)
 * Last activity: [14 years, 9 months ago](https://wordpress.org/support/topic/plugin-redirection-replacement-regex/#post-1878289)
 * Status: not resolved