mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-30 21:30:04 +00:00 
			
		
		
		
	citra: correct regex for matching nickname
This commit is contained in:
		
							parent
							
								
									72f9142bb1
								
							
						
					
					
						commit
						c0f352bc4e
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		|  | @ -199,7 +199,7 @@ int main(int argc, char** argv) { | ||||||
|                 address = match[3]; |                 address = match[3]; | ||||||
|                 if (!match[4].str().empty()) |                 if (!match[4].str().empty()) | ||||||
|                     port = std::stoi(match[4]); |                     port = std::stoi(match[4]); | ||||||
|                 std::regex nickname_re("^[a-zA-Z0-9._- ]+$"); |                 std::regex nickname_re("^[a-zA-Z0-9._\\- ]+$"); | ||||||
|                 if (!std::regex_match(nickname, nickname_re)) { |                 if (!std::regex_match(nickname, nickname_re)) { | ||||||
|                     std::cout |                     std::cout | ||||||
|                         << "Nickname is not valid. Must be 4 to 20 alphanumeric characters.\n"; |                         << "Nickname is not valid. Must be 4 to 20 alphanumeric characters.\n"; | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue