UK style date

Published on Tue Mar 01 2022


Additional matching regexes for
UK style date

nginx log parser

separate nginx log into database table-style fields

Cisco FastEthernet Ports 13-24

This regex captures Cisco-style FastEthernet ports 13-24

Cisco FastEthernet Ports 1-12

This regex will grab all Cisco-style FastEthernet ports from 1 to 12

Get path from any text

get path (windows style) from any type of text (error message, e-mail corps ...) compatible PCRE, PCRE2, and so, AutoHotkey (just escape "%" in "`%")

Currency amount validation with sign (cents optional)

Allows Number: Currency amount US (cents optional) Can use US-style 123,456.78 notation Optional thousands separators; optional two-digit fraction; commas; dollar sign

Triple Quoted String

More powerful than python style, this supports things like `"""" """"`, which matches totally. Also supports `"""a""""""b"""`, where there are two matches: `"""a"""`,`"""b"""`.

Reading only the "=" symbol

The pattern should match only the "=" symbols with in the html content other than the HTML attributes. i.e if we have <html><head>Sample head</head><body style="Font family: Courier New"><p> This is a test a=b=c=d or a = b = c </p> </body></html> The pattern should match only "=" outside the html tags <>

PHP file path with wrappers

Breaks file path up into wrappers, root, and path components. Understands both Windows (DOS) and Unix style paths. Wrappers and path components can be farther processed in code. Path component should support any visible Unicode character but not things like VT, HT or any other non-printing character. Most of the non-printable characters would also be allowed by file systems but are near impossible to enter.

Strip multi-line (star) comments from JavaScript, while leaving any CDATA sections intact.

This regular expression removes multi-line (star) comments from JavaScript, while leaving any CDATA sections intact. Use the global (g) modifier to match them all (if you plan to use PHP's preg_replace, the g modifier is not necessary), and use the (s) modifier to make dots match newlines (this will be required in for using with PHP's preg_replace function). This regular expression does not exhaust all possibilities (such as a space between the opening or closing star comment and the CDATA tag), but it functions if the style guidelines are of the more popularized variety.

Browser Console - Format Specifier

Captures format specifiers commonly used in logging and console messages, as defined in [the current whatwg/console spec]( - `%s`: Formats the value as a string - `%i`: Formats the value as an integer - `%d`: Formats the value as an integer - `%f`: Formats the value as a floating point value - `%o`: Formats the value as an expandable DOM element. As seen in the Elements panel - `%O`: Formats the value as an expandable JavaScript object - `%c`: Applies CSS style rules to the output string as specified by the second parameter