Trying to delete digits without changing anything else
Posted: Wed Dec 28, 2016 3:18 am
Hi there,
I am trying to delete only digits appearing after a space using the regex \s\d.
So far BRU does finds what I want it to find.
However, my trouble is what to write into the replace name, I simply want BRU to keep all other characters of the file just as they are, but for some reason, I can't find a solution for that.
Does anybody has an idea?
I.e.:
I have
>>filename series12 2053<<
>>filename series09 20<<
>>filename series17 2053897143<<
and so on
I need to keep >>filename series**<< therefore I used regex "\s\d" to "find" all digits only after a space
Sometimes, the amount of digits at the end of the filename are only 2, sometimes they are 14, sometimes 7 and so on
So I would need an extension to the expression "\s\d" to 'find' all of the digits after the space
And I need whatever I have to write into the field "replace" to keep anything else of the file name; problem here the "filename" may be one word,
but it may also be 2 or 3 or 4 or even more words, therefore "swapping" and then deleting beginning numbers in a second step is no option at all.
Thank you very much in advance and Happy New Year.
JHS
I am trying to delete only digits appearing after a space using the regex \s\d.
So far BRU does finds what I want it to find.
However, my trouble is what to write into the replace name, I simply want BRU to keep all other characters of the file just as they are, but for some reason, I can't find a solution for that.
Does anybody has an idea?
I.e.:
I have
>>filename series12 2053<<
>>filename series09 20<<
>>filename series17 2053897143<<
and so on
I need to keep >>filename series**<< therefore I used regex "\s\d" to "find" all digits only after a space
Sometimes, the amount of digits at the end of the filename are only 2, sometimes they are 14, sometimes 7 and so on
So I would need an extension to the expression "\s\d" to 'find' all of the digits after the space
And I need whatever I have to write into the field "replace" to keep anything else of the file name; problem here the "filename" may be one word,
but it may also be 2 or 3 or 4 or even more words, therefore "swapping" and then deleting beginning numbers in a second step is no option at all.
Thank you very much in advance and Happy New Year.
JHS