So suppose you want to remove the hyphen (-) in an AWS region name, you could write:
let region = ‘eu-west-1’;
let regionNoHyphen = region.split(‘-‘).join(”);
Much easier than using Regex, wouldn’t you agree?
Subscribe to my newsletter and get new contents delivered straight to your inbox :-)