use substr and 'ne'  instead of regex match