Title: RegEx example
Last modified: May 31, 2017

---

# RegEx example

 *  [levinside](https://wordpress.org/support/users/levinside/)
 * (@levinside)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/regex-example-2/)
 * **Problem:**
    [http://example.com/my/path/SomeID](http://example.com/my/path/SomeID)
   → [http://example.com/new_path/?id=SomeID](http://example.com/new_path/?id=SomeID)
 * **Solution:**
    Redirect From: `\/my\/path\/([0-9a-zA-Z]+)` + check «Enable Regular
   Expressions»
 * Redirect To: `/new_path/?id=$1`

Viewing 1 replies (of 1 total)

 *  [KunststoffWeb](https://wordpress.org/support/users/kunststoffweb/)
 * (@kunststoffweb)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/regex-example-2/#post-9387573)
 * Cool! Exactly what a RegEx-noob like me needed.

Viewing 1 replies (of 1 total)

 The topic ‘RegEx example’ is closed to new replies.

 * ![](https://ps.w.org/safe-redirect-manager/assets/icon.svg?rev=2791413)
 * [Safe Redirect Manager](https://wordpress.org/plugins/safe-redirect-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/safe-redirect-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/safe-redirect-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/safe-redirect-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/safe-redirect-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/safe-redirect-manager/reviews/)

## Tags

 * [regex](https://wordpress.org/support/topic-tag/regex/)

 * 1 reply
 * 2 participants
 * Last reply from: [KunststoffWeb](https://wordpress.org/support/users/kunststoffweb/)
 * Last activity: [9 years, 2 months ago](https://wordpress.org/support/topic/regex-example-2/#post-9387573)
 * Status: not a support question