Use regexp matching for memory settings