Hi,
I'm searching a way to add an expression into specific position in the JobName and didn't know how to to this.
For example, I need to add "-hd-" in JobName after position 10 from the first character of the JobName.
example : 1234567890myfile.jpg will be 1234567890-hd-myfile.jpg
I'm looking the RenameJob option and didn't find a way to do it.
Thanks a lot !
Rename Job - add text after number of characters
Re: Rename Job - add text after number of characters
1. Rename Job -> Search & Replace
Search For Regular Expression (\d{10})(.*)
Replace with: \1-hd-\2
- edit -
I assumed the first 10 characters are numbers. But should that not be the case, the RegEx to search for shall be:
(.{10})(.*)
Replacement is the same: \1-hd-\2
Search For Regular Expression (\d{10})(.*)
Replace with: \1-hd-\2
- edit -
I assumed the first 10 characters are numbers. But should that not be the case, the RegEx to search for shall be:
(.{10})(.*)
Replacement is the same: \1-hd-\2
Last edited by Arthur on Wed Jan 23, 2019 9:01 am, edited 1 time in total.
Re: Rename Job - add text after number of characters
Thanks Arthur, it works great !
Best Regards,
Christian
Best Regards,
Christian
Re: Rename Job - add text after number of characters
You can use the Rename Job if you do it in steps
First you have to set one folder to pick up the Job.NameProper as a Job.JobState variable
Action 1: Keep Segment 1-10
Action 2: Add suffix -hd-
Action 3: Add suffix [Job.JobState:Segment="11-"]
First you have to set one folder to pick up the Job.NameProper as a Job.JobState variable
Action 1: Keep Segment 1-10
Action 2: Add suffix -hd-
Action 3: Add suffix [Job.JobState:Segment="11-"]
Re: Rename Job - add text after number of characters
OK Thanks too Jan, I'll will test this too, it's a good idea !
Best Regards,
Christian
Best Regards,
Christian
-
- Newbie
- Posts: 1
- Joined: Tue Mar 26, 2019 10:35 am
Re: Rename Job - add text after number of characters
Hi, can I ask you how you can replace by a captured group ?
I try but it doesn't work.
I have a regex
I try to replace by or or
I try with replace "inline value" and "define regular expression".
Thanks for your help
I try but it doesn't work.
I have a regex
Code: Select all
-(FR|NL)$
Code: Select all
_\1
Code: Select all
_$1
Code: Select all
_#1
Thanks for your help
Re: Rename Job - add text after number of characters
the captured group shall be in {} I guess, not the regular ().
when it is defined as (NL|FR) it is literally taken as NL|FR not as either one or the other.
when it is defined as (NL|FR) it is literally taken as NL|FR not as either one or the other.