Fun with Regex

Yup, said fun with regex. My standard line is the old favorite “I have a problem that I solved with regex and now I have two problems”…

But Josh Bush tweeted about a regular expression game that Erling Ellingsen built.

There’s 15 levels that exercise different expressions in regex.

  1. Plain strings
  2. Anchors –
  3. Ranges
  4. Backrefs
  5. Abba
  6. A man, a plan
  7. Prime
  8. Four
  9. Order
  10. Triples
  11. Glob
  12. Balance
  13. Powers
  14. Long Count
  15. Long Count v2

I love these types of challenges specifically because gives a fun way  to learn new things and experiment without fear. I started playing it yesterday and it’s a fantastic time suck for a geek like me. Without looking up the regex cheatsheet, I got to about 1500 but then I had to dive deeper into backreferences and grouping than I had before. I wish JavaScript supported nested references but oh well.

I’m currently at 3293 but I’m positive I can break 3500 at some point in the near future as I don’t really feel like I’ve cracked Glob, Prime, or Triples.

Go play the Regular Expression game and make sure that you comment with your scores! 🙂

A little more about the Virtual Machines on modern.IE

Virtual Machines Logo Yesterday we updated somewhere around 90 VMs for modern.IE. This has been incredibly well received by most people but there was a little bit of "snark" that 90ish VMs was too many. But let’s break that down actually.

The reality is that we’ve got 9 client OS/browser combinations.

  1. Windows XP and IE6 (which A: goes out of support shortly and B: is less than 1% pretty much everywhere except China – http://www.modern.ie/ie6countdown – but for the 5 people that care, we’ve got a VM for you)
  2. Windows XP and IE8 (remember XP goes out of support in a few months)
  3. Windows Vista and IE7 (IE7 is still big in enterprises)
  4. Windows 7 and IE8
  5. Windows 7 and IE9
  6. Windows 7 and IE10
  7. Windows 7 and IE11
  8. Windows 8 and IE10
  9. Windows 8.1 and IE11

That’s a little more manageable and remember that two of those will drop off (theoretically) in just a few months.

How we get to 90ish is that then we cover virtual machines that run on 3 different OSes across all of the major virtualization platforms.

  1. Mac and Virtual Box
  2. Mac and VMWare
  3. Mac an Parallels
  4. Windows and HyperV on Windows Server 2008 R2 SP1
  5. Windows and HyperV on Windows Server 2012 and Windows 8 Pro
  6. Windows 7 and Virtual PC
  7. Windows 7 and Virtual PC
  8. Windows and Virtual PC
  9. Windows and VirtualBox
  10. Windows and VMWare
  11. Linux and VirtualBox

There’s a bunch of host OS/Virtualization platform combinations. If you multiple the guest OS/browser combinations and the host OS/virtualization platform combinations, you end up with a LOT of VMs but the reality is that you will only ever need to download a small handful of these at any given point in time.

The really good news, however, is that all of these options are free on the modern.IE Virtual Machines page when you need them.

Virtual Machine Downloads

More ways to test drive your sitemodern.IE has free virtual machine downloads for testing Internet Explorer.

As I mentioned in my last post about modern.IE, my team’s core mission is to write interoperable web sites across all of the major browsers and to help that, we’ve put together a set of tools to help you test cross browser and cross platform. The latest step that we’ve taken is that we’ve updated all of the VMs that we support which is a giant list. The updates include getting them up to date with security patches, latest versions of the right browsers, such as IE11 on Windows 8.1 and Windows 7, and more.

We have virtual machines for folks running Windows, OSX and Linux across the following virtualization platforms (dependent on base platform):

Hyper-V (Windows)
Virtual PC (Windows)
Virtual Box (Windows, OSX and Linux
VMWare (Windows, OSX)
Parallels (OSX)

The virtual machines include a lot of different Windows OS and browser configurations.

Windows XP with IE6
Windows XP with IE8
Windows Vista with IE7
Windows 7 with IE8
Windows 7 with IE9
Windows 7 with IE10
Windows 7 with IE11
Windows 8 with IE10
Windows 8.1 and IE11

To set expectations correctly, these are 90 day VMs. In other words, every 90 days they will expire and you can come back and download a new one that’s all up to date with the latest security patches but these are not just free Windows machines forever.

If you are testing web sites across multiple versions of Internet Explorer, I highly recommend that you go to the virtual machines page on modern.IE and download the latest VMs.

modern.IE

modern.IE I’m a Program Manager on the Developer Relations team for Internet Explorer. The core mission of my team is to help developers write interoperable web sites across all of the major browsers. To that end, we have put together a set of tools and downloads that will help you testing, especially for Internet Explorer but most of the tools help across app browsers.

modern.IE Scanner

The modern.IE Scanner is does a static scan of your web site looking for common issues on web sites. Currently, it looks for:

Fix common problems from supporting old versions of IE
Known compatibility issues
Compatibility Mode
Frameworks & libraries
Web standards docmode

Fix common problems from supporting old versions of IE
CSS prefixes
Browser plug-ins
Responsive web design

Suggested enhancement
Browser detection
Optimize the images on your page
HTML5 inputs

Suggested enhancement
Prerender + prefetch

Suggested enhancement

Compressed content

Consider building with some new features in Windows 8
Touch-first browsing
Flip Ahead Browsing
IE11 tiles + Notifications

Once you’ve scanned your site and reviewed the static results, you can take a look at how your site looks across a lot of browsers with the screen shot service by Browser Stack and also do a scan for code that’s no longer supported by current versions of Internet Explorer.

It will save you a bunch of time testing and looking for issues to scan your web site with the modern.IE Scanner.

Virtual Machine Downloads

The scanner is great but there’s nothing like looking at the real thing. To help here, the team has put up a large set of virtual machines to help you out here. These virtual machines are designed for you to do Internet Explorer testing.

We have virtual machines for folks running Windows, OSX and Linux across the following virtualization platforms (dependent on base platform):

Hyper-V (Windows)
Virtual PC (Windows)
Virtual Box (Windows, OSX and Linux
VMWare (Windows, OSX)
Parallels (OSX)

The virtual machines include a lot of different Windows OS and browser configurations.

Windows XP with IE6
Windows XP with IE8
Windows Vista with IE7
Windows 7 with IE8
Windows 7 with IE9
Windows 7 with IE10
Windows 7 with IE11 (Currently RP but soon to be release)
Windows 8 with IE10
Windows 8.1 and IE11 (Currently preview but soon to be release)

This is a lot of machines. If you count up all the variations of virtualization platform, OS and browser, it’s a little over 90 VMs that we’ve got for you to download.

These are 90 day VMs because they are not activated VMs. This means that in 90 days, you’ll need to come back and download a new one but that’s a good thing because we’ll be keeping them up to date with security patches and the like on the web site so you don’t have to think about it.

Offers

There are also partner offers that we give from time to time ranging from some percentage off of Parallels to a 3 month trial of Browser Stack (rather than their normal 1 month trial) and so on. These change from time to time so I’m not going to go through all of these here.

Summary

There’s a ton that the team is doing which is all aimed at helping web developers build an interoperable web. What I hope never happens again is a “Best viewed in X Browser” tag on a web site again.