DevTips | URL Parsing with RegEx, createElement and new URL() @OfficialDevTips | Uploaded May 2018 | Updated October 2024, 12 hours ago.
Exploring how to parse URLs first with Regular Expressions (RegExp), then with document.createElement, and finally with new URL().
Example with RegEx
codepen.io/devtips/pen/pVZbaw
Example with document.createElement
codepen.io/devtips/pen/GdXRwK
In which browsers will url.searchParams work?
caniuse.com/#feat=urlsearchparams
Exploring how to parse URLs first with Regular Expressions (RegExp), then with document.createElement, and finally with new URL().
Example with RegEx
codepen.io/devtips/pen/pVZbaw
Example with document.createElement
codepen.io/devtips/pen/GdXRwK
In which browsers will url.searchParams work?
caniuse.com/#feat=urlsearchparams