RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Expressions by User

   Displaying page 1 of 1 pages; Items 1 to 1
Title Test Details Parse file path
Expression
^(?<1>.*[\\/])(?<2>.+)\.(?<3>.+)?$|^(?<1>.*[\\/])(?<2>.+)$|^(?<2>.+)\.(?<3>.+)?$|^(?<2>.+)$
Description
Parses any file path and extracts directory, file name and extension separately.
Matches
d:\Program Files\Hello.txt | /home/Hello.txt | Hello.txt | .\Hello
Non-Matches
\\Hello\ | Hello\\
Author Rating: Not yet rated. Tim
   Displaying page 1 of 1 pages; Items 1 to 1

Copyright © 2001-2025, RegexAdvice.com | ASP.NET Tutorials