开发者

Regex to change last 2 numbers in set of 6 on condition

This number is in a filename string eg. abcdefg-sdasdfg-123开发者_如何转开发410.txt I am using an application which is changing the filename and can use regex. If there is a number at the end of the filename, such as 123410, I need to change the last 2 digits so it will be 123411.


Depending on which regex variant you're using, try something like this:

Search for: (.*)10(\..*)
Replace with: ${1}11${2}


Using Notepad++:

Find what: ([0-9]+)[0-9][0-9].
Replace with: \111.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜