Hello,
is it possible to insert some characters with any of the "Rename Special"-Tools at a specific place in the filename? I can match the position using RegEx, but I don't seem to be able to carry over the matched part (i.e. not replace it).
An example would be the filename "Something.or.other.###.something.else.ext" where ### are three digits.
I need to insert characters before and after the first of those digits, for example "Something.or.other.insert1#insert2##.something.else.ext", without (!!) removing or changing the digits.
The regular expression: "(\.)([0-9])([0-9][0-9])(\.)" should match & group the digits, but I can't find a way to just use the pattern to just find the spot and add characters (instead of replacing it with a static string).
Is there any way that I've missed?
thanks,
Creat
Possibility to Insert characters with Rename Special
-
jacky
- XYwiki Master
- Posts: 3106
- Joined: 23 Aug 2005 22:25
- Location: France
- Contact:
Re: Possibility to Insert characters with Rename Special
Given what you describe, I would think that regexp is indeed the way to go. And the one you're using should be working, I just tried it as such and it looks to do what you want, here:Creat wrote:The regular expression: "(\.)([0-9])([0-9][0-9])(\.)" should match & group the digits, but I can't find a way to just use the pattern to just find the spot and add characters (instead of replacing it with a static string).
Code: Select all
\.([0-9]{1})([0-9]{2})\.>.FOO$1BAR$2.To use matched part from your regexp they must be within parenthesis on your search pattern, then use the $n syntax on the replace pattern.
Hope this can help.
PS: A couple of examples & a link to a nice site about regexp and how they work can be found on XYwiki if you're interested
Proud XYplorer Fanatic
-
Creat
- Posts: 234
- Joined: 22 Sep 2005 18:27
Re: Possibility to Insert characters with Rename Special
Yea indead it did, thanks a bunchjacky wrote:Hope this can help.
this is awesome, finally just one click to rename everything!
bye
Creat
XYplorer Beta Club