View Single Post
08/17/15, 12:24 PM   #4
Sasky
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 231
I wonder if it's consuming the input pattern as it matches. Something like:

First match of "une rune de puissance" is "une ".
It then tries to match against "rune de puissance", then "de puissance", etc.

If that's the case, you could get the space in a separate step.
Lua Code:
  1. string.gsub("une rune de puissance", "^(%l+)", {une="<une@>", de="<de@>"}):gsub("@> ",">",1)