I'm using this Windows a开发者_如何学Cpplication to batch rename a bunch of images. The application supports Regex, so I'm looking for an expression that will match everything (letters, numbers, hyphens, anything) before my file extension.
Thanks!
Not quite enough information given in the question, but this is probably what you want:
([^/\\]+)(\.[^/\\]+?)?
The first capture group will contain your file's basename and the second capture group will contain the extension, including the '.' character, if it exists.
You can reference the two capture groups in the 'Replace' section with $1
and $2
.
精彩评论