get all files

Published on Tue Mar 01 2022

Additional matching regexes for
get all files

Zeitnahme

Parses "Zeitnahme" text files

Replace dotnet assembly versions

Replaces both VB & C# `AssemblyInfo` files.

Culture File Name Extraction

Extracts the culture name from a javascript file. Works with minified and non minified files.

File filtering by extension

You would like to scan a folder containing many files (Example : *.pb, *.pbi, *.pbp and *.pbf) and you are interested only by two type of files (example : *.pb and *.pbi). This expression will match only if extension match (in this case *.pb and *.pbi) otherwise no reaction. Feel free to change file extensions has need.

CSS Minimizer

Takes any valid CSS and minimizes it, removing comments and whitespace. Can be called with something like PHP's preg_replace() to dynamically minimize css files.

REGEX to parse IIS7 Log File into FluentD

This regex parses the entire line of the IIS log files (without detail on the AgentID) for usage into FluentD. Q&C - [email protected]

CSV parsing

matches the exact fields of CSV files supports: qouted fields quoted fields containing commas, doubble quoutes, and newlines empty fields empty records arbitrary white space in, and outside quoted fields

Fetch data between curly braces with plain text

This regex fetch only the data between content in curly braces (first occurrence, use preg_match_all in php, for all occurrences). This is useful for bad JSON files with wrong format or text between.

Replace Commas Inside Quotes

Regex to remove commas within quotes. (Common situtaion in .csv files) Eg: data,"some ""embedded"" stuff,commas,inside,quotes",more Replace String would be something like this: \1&\2&\3&\4&\5\&\6&\7&\8&\9 which would replace the commas inside the quotes with '&'s Caveats: * embedded quotes ("") remain in the matches * limit of 9 terms within quotes Work in progress ...

URL supporting ports, GET params and js routing

(http(s)?:\/\/) // http:// or https:// (([a-zA-Z0-9_\-])+(\.([a-zA-Z0-9_\-])+)+(:[1-9]+[0]*)?)(\/?| // basic url f.e. www.wp.pl with obligatory / at end ((\/(#?[a-zA-Z_\-\.])+)*)(\/?| // subfolders or asp files plus possible # for routing or anchor with obligatory / at end \?([a-z]+\=([a-z]+|[a-z]+,[a-z]+)*&)*([a-z]+\=([a-z]+|[a-z]+,[a-z]+)*)\/?)) // http GET parameters with obligatory / at end