URL infos

Published on Tue Mar 01 2022

A powerful regex (fewest steps possible) which gives you all the information about urls.

Additional matching regexes for
URL infos

URL infos

A powerful regex (fewest steps possible) which gives you all the information about urls.

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"""`.

Extract url GET parameters

Returns key/value pair of a url. Also works with google fonts which has additional information

RFC 5322 email validation

Unsatisfied with your email validation? Concerned about standards compliance? Worried about that one weird edge case? Want to stress-test your regex engine? This might be the regex for you!

Minify JSON while protecting string value whitespace

I use it so that I don't need to worry about formatting when working with unit tests in Kotlin, which means I don't worry too much about whether this is production quality, but it could be useful in other situations where the desire is to strip whitespace from a JSON object while protecting the values of stings which have whitespace.

RegEx to validate oAuth 2.0 redirect_uri

A simple RegEx rule which should validate redirect_uri for oAuth2

How to document a regex? Example 1

How to document a regex? Example 1: undocumented Regex which works with my test string


simple url regex which also prevents capture of a trailing ">" (the html representation of ">")

Strip Email ID from Name

Use this regex to select all characters up to the "<" bracket. Then, reverse the direction of the bracket to select the closing ">" bracket. It works across multiple lines. You can get an email list with only the IDs. This is the pattern it matches: Alpha Person <[email protected]> Step 1 (.*) [$<$] gives you [email protected]> Step 2 [$.$] (.*) gives you [email protected]

Date extractor

Substitutes a group of dates by its information and captures the date information. Also allows fooled dates. (2015-02-30, 2015-03-32 for example)