2019-07-09

Regex - Get Filename and file extension

Regular Expression to separate the filename from the extension.
Regex Get Filename:        [^\/]*(?=\.[^.]+($|\?))

Regex Get File Extension:  \.[^.\\\/:*?"<>|\r\n]+$ 
   (includes period .ext)

No comments:

Post a Comment

Comments are moderated and published upon review. (As an aside, not a single spam has been allowed through; why bother?)