View Single Post
06/29/23, 06:27 PM   #9
Sharlikran
 
Sharlikran's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 660
^(%S*)%s*(%S*)%s*(%S*)%s*(%S*)$

My thought, WOW!

https://www.lua.org/pil/20.2.html

So you are telling it to check at the beginning of the string with the ^ symbol. Group 1 you look for Zero or more non space chars. Then for the default group (which isn't really a group) you look for Zero or more spaces. Then Group 2 you look for Zero or more non space chars. The default group again for Zero or more spaces. Then Group 3 you look for Zero or more non space chars. Then a third time, the default group again for Zero or more spaces. Then Group 4 you look for Zero or more non space chars. The last group matches up to the end of the string with the $ symbol, as long as it isn't a space.

The default group might actually be group 1 for Lua which means that you have 1 through 5 rather then the default and 1 through 4.

Last edited by Sharlikran : 06/29/23 at 08:27 PM.
  Reply With Quote