filename split 2

Published on Tue Mar 01 2022

Additional matching regexes for
filename split 2

URL with matching categories

Finds the protocol, subdomain, ((domain, extension)/ipaddress), port, filepath (split in path and filename), the route and the query string.

FIlename sanitization regular expression

Useful for filename sanitization. Matches invalid filename characters. Can be used in preg_replace() calls.

Song Splitter

Split an audio filename into a readable format for playlists (like jPlayer) assuming the audio file is named like the following: Artist - Song Title.mp3 Band Name - Track Title ft. Another Artist.m4a demon.devin - Faithless Angel (to no avail remix).mp3

Select all chars before last backslash

For selecting paths without filename

Simple email splitter

Split the email and get the user and domain.

file extension

get the file extension of a given filename

Complete Machine Readable Passport pattern

Regex to identify and split the components of a machine readable passport pattern text

find pattern in filename product name, version, build and extension

find pattern in filename product name, version, build and extension

File name without extension from linux path

If given a linux file path match the filename without the extension. It extracts FileNameWithoutExtension into its own match group so that you can use it in things like Logstash Grok.

full url dissection

any given url inside a text will be recognized and split into different groups: - url (full url) - scheme - hostname (subdomain + domain + tld) - port - path - query (GET-parameters) while the only group required for a match is the hostname, therefore `` would allready be a match.