Getting player name from part of their username?

Title is mostly self-explanatory. I have this code

if args[2] then
		if args[2] == "me" then
			return player
		elseif args[2] == "all" then
			local players = {}
			for _,v in pairs (game.Players:GetPlayers()) do
				table.insert(players, v)
			end
			return players
		else
			if string.sub(string.lower(player.Name), 1, string.len(args[2])) == string.lower(args[2]) then
				return args[2]
			end
		end
	end

It all works just fine, but when I typed in a shortened version, like “zcr”, it just returns that, and not the full username. How could I achieve this, and how could I use it for display names?

User String.Match. Thats what u need. More info here:

If you want it with both user names and display names make it check if the string.match works with either their display name or user name. If you have any questions feel free to ask.