What does this regex do? i know it replaces the filename (but not extension)
Regex r = new Regex('(?<!\\.[0-9a-z]*)[0-9]'); return r.Replace(sz, '#');
How do i make it only repeat 5 times? to make it convert ‘1111111111.000’ to ‘11111#####.000’ ?
I havent’ tried this butHave tried it, works: how about changing the general pattern to use a positive lookahead instead? That way, it should work:Basically, this finds any (alphanumeric) character followed by up to four other alphanumeric characters and a period. This might just work to match the last five characters in front of the period consecutively. It’s hellishly inefficient though, and it only works with engines that allow variable-width lookahead patterns.