I don't understand it AT ALL: /^[a-z0-9][a-z0-9\.\-_]*$/i And I don't need to... I just want to modify it to allow spaces. BUT not only spaces, just like not only _ and - (that should be there already). So Spaces with characters and numbers only. Can it be done?
Try this: for one space: /^[a-z0-9](\s?[a-z0-9\.\-_]*|[a-z0-9\.\-_]*\s|[a-z0-9\.\-_]*\s[a-z0-9\.\-_]*)$/i for two spaces /^[a-z0-9]((\s\s)?[a-z0-9\.\-_]*|[a-z0-9\.\-_]*\s\s|[a-z0-9\.\-_]*\s\s[a-z0-9\.\-_]*)$/i