Displaying page
of
pages;
Items to
Title |
Test
Details
Parse & Extract Filename Parts
|
Expression |
^(.*?)([^/\\]*?)(\.[^/\\.]*)?$
|
Description |
Simple (non-validating) match with numbered group captures that extracts parts of a filename into $1 = folder path, $2 = filename w/o extension, $3 = extension. Should work on Windows, OS X, and Unix/Linux, but not on OS 9 and OSs with folder separators other than slashes (either direction). Tested only on .NET RE engine.
|
Matches |
test | test.txt | C:\test | C:\test.txt | C:\test.txt\testing.txt | C:\folder\test | C:\folder\test.txt.txt | C:\folder\test.txt.txt\testing.txt | /usr/test | /usr/test.txt | /usr/test.txt/testing.pdf
|
Non-Matches |
N/A (some captures may end up being blank in the event of a relative path or no file extension)
|
Author |
Rating:
Matthew
|
Displaying page
of
pages;
Items to