Home URI Linux File Path Regular Expression Linux File Path Regular Expression A regular expression to match the path of a file in Linux. /^\/(?:[^/]+\/)*[^/]+$/ Click To Copy Linux File Path Examples: /root/b.ts /root/abc See Also: Windows File Path Regular Expression # File# Linux Previous Post HTML Comment Regular Expression Next Post Linux Hidden File Path Regular Expression More Like This: Regex To Match Everything Before The Last Dot Regex To Extract Filename & Domain Name From URL Regular Expression To Extract File Extension From String