Does anybody know how do I can remove all extensions of file with regex rules ???
for example file: sdfkghsjhg3248-sdf_034--d3.org.filt.dat
should be: sdfkghsjhg3248-sdf_034--d3
Right now I'm using quick fix:
But it is unlikely going to work with all possible filenames.
PLZ HELP !
I have looked into your problem and there is actually no way to really get just hte file name without the extension. All you can do is either remove everything and including the last dot in the filename or just take the eveything before the first dot in the filename ( which would be [\w-]+)
Reason being is that filenames alone may contain dots, which is possible
i can call my file my.txt and it would have the extension txt reaulting into the full name my.txt.txt
Another option would be to create a source of all valid file extensions (maybe to get them from the system) to get the filename only, which is in this case a pretty darn work, and also not accurate since there are almost infinite file extensions.
Hope I could clear up the matter a bit.