Hi Anu Anand Premji and All,
Well, I’m back home and here are some explanations on the two S/R :
The two search regex begin with the modifier (?-s) ( No PCRE_DOTALL ) that ensures that the regex engine will consider the dot special character . will match only a single standard character and not an EOL character
Then the part, ^.+\. matches, from the beginning of the current line ^, a maximum, NON empty, of characters, till a literal dot character ( which must be escaped by an antislash character \ in order to be considered as literal ) So, if the filename would be, for instance, “abc.def.ghi.cpp”, this range would be the string abc.def.ghi
The remainder of the search regex (.+) catches the remainder of the standard characters of the current line ( The extension part ) which is stored as group 1, due to the couple of parentheses
In replacement, the regex \1\t\t$0 rewrites the group 1 ( The extension part ), then two tabulation characters and, finally, the searched string, that is to say the name of each file, with its extension ( part $0 )
I preferred to use the tabulation character, instead of some spaces, because, with the tabulation character, the complete filenames look all aligned :-)
In the second S/R the part ^.+ selects, from the beginning of each line ^, the range maximum, NON empty, of standard characters, till a non empty range of tabulation characters \t+
As the replacement field is, this time, empty, all these characters, included tabulations , are, simply, deleted !
Cheers,
guuy038