You are not logged in.
Pages: 1
Hello,
I have some files like this :
Machin - 11569299 My Great Folder
10 My Wonderful Folder 20456334
I would like to keep only the 8 digits, like
Machin - 11569299 My Great Folder > 11569299
10 My Wonderful Folder 20456334 > 20456334
I know how to select this digits via Regex \d{8} but not how remove everything else
Thanks
Best Regards
Nexus
Offline
This should do it...
Expression: .*\b(\d{8})\b.*
Replace: $1
See the wiki for the reference:
http://www.den4b.com/wiki/ReNamer:Regular_Expressions
Offline
Thanks a lot.
I'm impressed !! The regex are so obscure to me
Offline
The regex are so obscure to me
They are quite intimidating, but not that difficult to use once you understand the basic building blocks.
For example...
"." matches any single character.
".*" matches 0 or more of any characters.
"\b" is a word boundary, so that your 8 digits are not part of a larger sequence of letters or digits.
"\d" is a single digit (0..9).
"\d{8}" is exactly 8 digits.
"(\d{8})" is a grouping, so that it can be reused in the Replace field via $1, $2, $3 and so on, one for each group.
Offline
NexusFred wrote:The regex are so obscure to me
They are not that difficult to use once you understand the basic building blocks.
For example...
EmEditor uses a great inner spreadsheet (in its search/replace window) that can be shown by clicking the droplist button, without a requirement to download something or visit a site.
I suppose ReNamer can use such a handy built-in list too, for inserting any of needed samples rapidly. I saw that ReNamer's got such drop-list, and anyway there's something to learn from EmEd imho:
And here is a short version of these sheets:
https://i.imgur.com/yYZGJU7.png
https://i.imgur.com/RSRAr62.png
You may save it from here and use in the future, Fred.
Offline
Pages: 1