How can i get substring of a subpattern?

Advanced Renamer forum
#1 : 14/07-22 06:22
Matan
Matan
Posts: 7
Saying I've got "\1", how can i get the first letter or second letter of it?
or characters from the second letter to its length.


14/07-22 06:22
#2 : 14/07-22 10:39
David Lee
David Lee
Posts: 1026
Reply to #1:
Change your regex to return just the characters you want. If you want a more specific reply you will need to provide examples of what you are trying to achieve.


14/07-22 10:39
#3 : 15/07-22 01:01
Matan
Matan
Posts: 7
Reply to #2:
i see, that's kind of annoying though.
would be much more comfortable if i could take a substring from the sub pattern.
i used your solution though since there's no other way apparently.


15/07-22 01:01
#4 : 15/07-22 09:56
David Lee
David Lee
Posts: 1026
Reply to #3:
It is straightforward to extract a substring - but you will need to use JavaScript in a Script method.


15/07-22 09:56
#5 : 15/07-22 09:59
Matan
Matan
Posts: 7
Reply to #4:
but then you'd need to recreate the method too no?


15/07-22 09:59