Regex for parsing directory and filename June 5, 2023 by Tarik Try this: ^(.+)\/([^\/]+)$ EDIT: escaped the forward slash to prevent problems when copy/pasting the Regex