#1 2015-11-26 12:52

bubbles15
Member
Registered: 2015-11-26
Posts: 2

Regular expression is returning literal replace option

Hello, I apologise for my ignorance here:

I'm trying to use a regular expression to replace instances of 1-99e with 1-99x, as that's the format my nieces want.

Using a regex replace  I've tried to do: Expression (\d)e and replace (\d)x, yet when running, Renamer returns the literal replace, so instead of 4e99 becoming 4x99 it becomes (d)x99.

I would be very grateful if someone would kindly point out where I am going wrong.

Is there a simpler 'Replace' rule I could use, that looks for a number and changes the text after it?

Many thanks.

Offline

#2 2015-11-26 17:21

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,370

Re: Regular expression is returning literal replace option

Hello.

It looks like you are using a Replace rule, which doesn't work with regular expressions.

You should use a specialized RegEx rule, like below:

RegEx: Replace expression "(\d)e" with "$1x" (skip extension)

Offline

#3 2015-11-27 12:03

bubbles15
Member
Registered: 2015-11-26
Posts: 2

Re: Regular expression is returning literal replace option

Hello,

Many thanks, that worked beautifully.

Offline

Board footer

Powered by FluxBB