Post History
Lua 5.4, 62 bytes _,w=s:gsub('%w+',0)_,c=s:gsub('[^\n]',0)_,n=s:gsub('[%g\t]',0) Attempt This Online! Another version, 65 bytes: p={'%w+','[^\n]','[%g\t]'}for i=1,#p do _,r[i]=s:gsub(p[i],'...
Answer
#3: Post edited
# [Lua 5.4](https://lua.org/versions.html#5.4), 67 bytes- ``` lua
_,w=s:gsub('[%w]+','')_,c=s:gsub('[^]','')_,n=s:gsub('[%g\t]','')- ```
[Attempt This Online!](https://ato.pxeger.com/run?1=VZBNCsIwEIXX9hSzkbQ4hdZuRNCNG-_QVNH-UQippC0RxJO4KYgX8DbFy2jatLWTGQJvPt4LeTxZdaqbj0QIEThswMG2DSPJBVyxgIzD5ZSJwrwZM7KPGctB5oJFBEGVbW_BXyK47m-cQDEeYw6AdISroYFZDkzrQ0vKe68J4yqGcnV0zJilH6iIn0RgUj3htcTdgih_VWVir5rdEeWmWKdFdTaJP5fBgiAh1hHDUT1QHmiV_7EpLTu5s3pfRMZLU3-ZZcQ86hZ13d1f)- -----
Another version, 67 bytes:- ``` lua
p={'[%w]+','[^]','[%g\t]'}for i=1,#p do _,r[i]=s:gsub(p[i],'')end- ```
[Attempt This Online!](https://ato.pxeger.com/run?1=VZDBSsQwEIbP5imGlZIG06XdvYhQL168e2yjVNotYWMSktQqpU_ipSC-j9d9G5O122VnEiYk3_w_k69v0VXT4ddADsOI0E4Z-KAWuARdcWPjAV3hx0YIBb0yosYUQiTJPRQbClnmd8oCsxUiBehTk83QwmwW5qhTulKetC6YLDClDDnbnL1SCmEFwl9huIgTsT0SI4Fa_XRul9weHnQ-4CLq2Q2muHguJQs1akvH8Bhm5XlGr7VvgBdqCs5ye9fa7jXW_kwxJo2sZ6mngO-bTwrvleia8w-Z4AdcrXvDXRNbZ7hs155-q1y8iiys5hZCwMsh7d9dTNAiPU3_9Q8)
- # [Lua 5.4](https://lua.org/versions.html#5.4), 62 bytes
- ``` lua
- _,w=s:gsub('%w+',0)_,c=s:gsub('[^
- ]',0)_,n=s:gsub('[%g\t]',0)
- ```
- [Attempt This Online!](https://ato.pxeger.com/run?1=VZDfCoIwFIev8ynOjUzpCFNvIrDr3sFZVKYIY4upLIiepBsheoHeJnqZnP_Csx0G3z5-Z-zx5PWh-Xw1wglBQAQUu21ZmVRwxRIKAZdDoUrnZi3I9sy5BC0VTwmCKc_bQBwg-H7bNDFOyDkF0FT5gzQ5weR0OaxiYsyaOb5xmDBrGPOfNTzQGC0iMKvRCDvj7kIqX3WVeavPZo86Ktd5WR8dYuslQeru8TSheMdE0kPxh3bOqo72Ke-LKkTlDL_lWmeR9hdN058_)
- -----
- Another version, 65 bytes:
- ``` lua
- p={'%w+','[^
- ]','[%g\t]'}for i=1,#p do _,r[i]=s:gsub(p[i],'')end
- ```
- [Attempt This Online!](https://ato.pxeger.com/run?1=VZDBSsQwEIbP5imGlZIG06XdvYhQwZt3j22VSrMlbExCklql9Em8FMT38bpvY7J2u-xMwoTMl_9n8vUtuno6_BrIYRgR2ikDH9QCl6Brbmw8oCv8yIRQ0CsjGkwhRJLcQ7GhkGV-p1VgtkKkAH1qshlamM3CHHVKV8qT1gWTBaaUIWebs1dKIaxA-CsMF3EitkdiJNCon87tktvDg84HHPU3mOLiuZRVqFFbugqPYVKeZ_RaexxeqCl4ldu71navsfZnijFhspmFngK-Z58U3mvRsfP_mOAGXK17wx2LrTNctmtPv9UuXkUWVvMTQsDLIe37LiZokZ6m__oH)
#2: Post edited
# [Lua 5.4](https://lua.org/versions.html#5.4), 69 bytes- ``` lua
_,w=s:gsub('[%a%d]+','')_,c=s:gsub('[^]','')_,n=s:gsub('[%g\t]','')- ```
[Attempt This Online!](https://ato.pxeger.com/run?1=m704pzRxwc3txQq2CuoeqTk5-Qrl-UU5KeoKurp2CtFGOgqGhkBsEMulqwtRY5yTY6CgUG5QZIisyAhVEdigmJKYPHTDwAbC1cXkgSBU2kBHAYTgkgoKCggZY7BMuY5Cso5CHlAWqnhpaUmarsVN13idcttiq_Ti0iQN9WjVRNWUWG11HXV1zXidZIR4XExeLFQ0D0l1ekwJRBhi2LqCosy8Eg2oVVDBBQsgNAA)- -----
Another version, 69 bytes:- ``` lua
p={'[%a%d]+','[^]','[%g\t]'}for i=1,#p do _,r[i]=s:gsub(p[i],'')end- ```
[Attempt This Online!](https://ato.pxeger.com/run?1=XYxRSsQwEIbfPcXPSkmLydLuvohQ30Tv0FSJtFuCMSlJapFlT-JLQXzzQnsbm26pq2TCDPN_8318qk4Mx2-HHOShVsqgN1ZVBIzdothQZNn40_KCsROzVSoF-tRm59DmLzSJuOf6v2wSLhzX4c1xShFqCQH8JtspseN-f_jq_I5dH-_afE-KSERVeUUoKR65LkOPGu5LctgZC5ln9LJFZfBEbSHL3N00rnuO23GmhCS1rmbZfcBf6neKN6G6GlKjFdK62CbhXJp1b6WvY-et1M16pF-Fj1eRw2o-SRIsumE49R8)
- # [Lua 5.4](https://lua.org/versions.html#5.4), 67 bytes
- ``` lua
- _,w=s:gsub('[%w]+','')_,c=s:gsub('[^
- ]','')_,n=s:gsub('[%g\t]','')
- ```
- [Attempt This Online!](https://ato.pxeger.com/run?1=VZBNCsIwEIXX9hSzkbQ4hdZuRNCNG-_QVNH-UQippC0RxJO4KYgX8DbFy2jatLWTGQJvPt4LeTxZdaqbj0QIEThswMG2DSPJBVyxgIzD5ZSJwrwZM7KPGctB5oJFBEGVbW_BXyK47m-cQDEeYw6AdISroYFZDkzrQ0vKe68J4yqGcnV0zJilH6iIn0RgUj3htcTdgih_VWVir5rdEeWmWKdFdTaJP5fBgiAh1hHDUT1QHmiV_7EpLTu5s3pfRMZLU3-ZZcQ86hZ13d1f)
- -----
- Another version, 67 bytes:
- ``` lua
- p={'[%w]+','[^
- ]','[%g\t]'}for i=1,#p do _,r[i]=s:gsub(p[i],'')end
- ```
- [Attempt This Online!](https://ato.pxeger.com/run?1=VZDBSsQwEIbP5imGlZIG06XdvYhQL168e2yjVNotYWMSktQqpU_ipSC-j9d9G5O122VnEiYk3_w_k69v0VXT4ddADsOI0E4Z-KAWuARdcWPjAV3hx0YIBb0yosYUQiTJPRQbClnmd8oCsxUiBehTk83QwmwW5qhTulKetC6YLDClDDnbnL1SCmEFwl9huIgTsT0SI4Fa_XRul9weHnQ-4CLq2Q2muHguJQs1akvH8Bhm5XlGr7VvgBdqCs5ye9fa7jXW_kwxJo2sZ6mngO-bTwrvleia8w-Z4AdcrXvDXRNbZ7hs155-q1y8iiys5hZCwMsh7d9dTNAiPU3_9Q8)
#1: Initial revision
# [Lua 5.4](https://lua.org/versions.html#5.4), 69 bytes ``` lua _,w=s:gsub('[%a%d]+','')_,c=s:gsub('[^\n]','')_,n=s:gsub('[%g\t]','') ``` [Attempt This Online!](https://ato.pxeger.com/run?1=m704pzRxwc3txQq2CuoeqTk5-Qrl-UU5KeoKurp2CtFGOgqGhkBsEMulqwtRY5yTY6CgUG5QZIisyAhVEdigmJKYPHTDwAbC1cXkgSBU2kBHAYTgkgoKCggZY7BMuY5Cso5CHlAWqnhpaUmarsVN13idcttiq_Ti0iQN9WjVRNWUWG11HXV1zXidZIR4XExeLFQ0D0l1ekwJRBhi2LqCosy8Eg2oVVDBBQsgNAA) ----- Another version, 69 bytes: ``` lua p={'[%a%d]+','[^\n]','[%g\t]'}for i=1,#p do _,r[i]=s:gsub(p[i],'')end ``` [Attempt This Online!](https://ato.pxeger.com/run?1=XYxRSsQwEIbfPcXPSkmLydLuvohQ30Tv0FSJtFuCMSlJapFlT-JLQXzzQnsbm26pq2TCDPN_8318qk4Mx2-HHOShVsqgN1ZVBIzdothQZNn40_KCsROzVSoF-tRm59DmLzSJuOf6v2wSLhzX4c1xShFqCQH8JtspseN-f_jq_I5dH-_afE-KSERVeUUoKR65LkOPGu5LctgZC5ln9LJFZfBEbSHL3N00rnuO23GmhCS1rmbZfcBf6neKN6G6GlKjFdK62CbhXJp1b6WvY-et1M16pF-Fj1eRw2o-SRIsumE49R8)