If you have a JavaScript regular expression instance (doesn’t matter how you construct it) that you want to re-use so that you don’t have to recreate it for every use, beware, particularly if you use the ‘g’ or ‘y’ flags. Examples abound that include the use of ‘g’ flag, and superficially it can sound good — find all matches. Even regex101.com defaults to ‘gm’ flags.

Given that regular expressions are relatively complex in their own right and few devs (myself included) fully grok them, you certainly might find yourself using a flag like ‘g’ without really thinking about it, and then scratching your head when it doesn’t work. …

Here’s a new one.. I changed my CPU/Memory config for a Parallels VM on my Mac today, and when I started back up, it said it had no network. It was working before I reduced the CPUs and RAM I allocate it…

I tried the usual things:

  • Disable/enable the adapter.
  • ipconfig /release and ipconfig /renew
  • Restart Windows
  • Reinstall Parallels Tools
  • Change Adapter option for the VM to Disconnected and back.
  • Restart Parallels itself

I tried setting it to bridged, and it worked — so the VM adapter seems OK. …


Ambrose Little

Experienced software and UX guy. Principal Software Engineer at GLG. 8x Microsoft MVP. Book Author. Husband. Father of 7. Armchair Philosopher.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store