I am new to regular expressions. I need help in replacing few filenames.
We have few filenames like abcd.txt.pgp, 1234.xxx.pgp, 4567.yyy.pgp
I must replace the .txt.pgp from file1, .xxx.pgp from file2 and .yyy.pgp from file3 with nothing
In simple terms, Can anyone of you help removing whatever is present after . (decimal). we have a common framework so the filenames will be input and we must remove whatever present after (.). So, there will be only one replace string service.
If your file name pattern is always like this “abcd.txt.pgp”. Tokenize the file name with “.” delimiter access 0th element in the sting list and ignore others.