How to check if start of variable is empty using string.match()

I need to validate if the starts of variable is empty:

Code:

local pattern = 'Workspace%..'
local str = "game.Workspace.Baseplate"
if string.match(str, pattern) then
   print("yay")
else
   print("fals")
end

I have 2 conditions:

local con1 = "Workspace.Baseplate" -- returns true
local con2 = "game.Workspace.Baseplate" -- returns false

But if I run con2 it will returns true, how do I make it to return false? thanks

Why do you want to make game.Workspace not work

Cuz I’m making a system like the player type the part’s path and the player can change the target path properties but game.workspace won’t work idk why

Use :lower() on the input and match Like this:

low = normal:lower()
low:match(“game.workspace”)
— something like this
local pattern = 'Workspace%..'
local str = "game.Workspace.Baseplate"
local low = str:lower()
if not string.match(low, ”game.workspace”) then
   print("yay")
else
   print("fals")
end