%w and %W as in here: Str = string.gsub(Str, “%f[%w]cat%f[%W]”
What's the difference between a small %w and a big %W ?
Here are more examples: for _ in string.gmatch(“\n” .. Str .. “\n”, “%Wcat%W”) do ,
if Pos1 == 0 or string.find(Str, “^%W”, Pos1) then
I know %w matches a word character
So i expect %W matches a capital word character?
%Wis the complement of%w, meaning it matches all non-alphanumeric characters.From §6.4.1 – Patterns (Lua 5.4):