var REG = / \ + D / G; var text = "Christi 234+ 56 put"; var MS = text.match (REG); the console.log (MS) // [ "234", "56"]