Get Nth value (3 times)

Published on Tue Mar 01 2022

capture Nth character from string, 3 times

Additional matching regexes for
Get Nth value (3 times)

Get Nth value (3 times)

capture Nth character from string, 3 times

Extract Dirty `href` Values in HTML

Even though using a delimiter within a string, without escaping it, is an illegal character, sometimes this still happens and we need to extract a HTML value.

MySQL PHP connection string

Capture dbname and host from MySQL PHP connection string

Element's Attribute Value in XML (simple)

Simple regular expression for extracting attribute value of the element in XML-string. Attribute value should be in quotes.

US Zip Code Validation

5 digits and no 0 5/4 times

find single character

Why this regEx not find all single character? Why not work Start of string and End of string in bracket?

Anything sorounded by " "

Match anything inside double quote string and set the first capture group with the content

Browser Console - Format Specifier

Captures format specifiers commonly used in logging and console messages, as defined in [the current whatwg/console spec](https://console.spec.whatwg.org/#formatter): - `%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

Browser Console - Format Specifier

Captures format specifiers commonly used in logging and console messages, as defined in [the current whatwg/console spec](https://console.spec.whatwg.org/#formatter): - `%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

Extract times from a string

I use this to extract and later calculate the difference between two times.