Retrieving query string variables with JavaScript

Published on Feb 8, 2018 by Jamie Munro

This is not something I use everyday. Seems more like a once a year thing. Last time I needed to extract query string variables, I used the old school approach with a regular expression. Now that I need to do this again, I can use the new school approach: URLSearchParams.

The URLSearchParams (at the time of writing) is not yet standardized in the W3C; however, most modern browsers recognize it.

Let's start by looking at the old school way using regular expression to compare how much easier it is when browsers begin working together to support ease-of-use:

Read more >

Tags: Javascript | JavaScript | regexp | urlsearchparams

Regular Expressions with Mysql

Published on Oct 2, 2012 by Jamie Munro

I must admit, this is something that I've never done until just recently; creating a regular expression in Mysql. I've typically been able to accomplish whatever I wanted to with a LIKE statement or some server-side code.

However, just recently I updated the plugin I use to output sample code. I was previously using a syntax of [codesyntax lang="php"] and now I needed to change it simply be [code]. This wasn't that simple since I've done hundreds of blogs with several different languages. In searching I had over 15 distinct differences hence, regular expressions to the rescue!

Read more >

Tags: SQL | mysql | udf | regexp