Reputation: 75
How do I rewrite
/product-category-xyz/prefix-product-name-and-model
into
/prefix/product-category-xyz/product-name-and-model
for easier reporting in Content Drilldown report?
Upvotes: 0
Views: 704
Reputation: 8907
You can try this out:
Extract A: "Request URI"; ^(\/.*)(\/.*)-(.*)
Extract B: {leave blank}
Constructor: $A2$A1/$A3
Hope this helps.
Upvotes: 2
Reputation: 4724
one possible solution..
Regex:
(.*\/)(.*?)-(.*)
Substitution:
/\2\1\3
Demo:
http://regex101.com/r/zD6iJ3/1
Upvotes: 2