I got this string in a Lua script:
one;two;;three;four;;five;;six;seven;
The first char will never be a semicolon. The middle separators can be a single or double semicolon, and the last char can be or not a single semicolon.
Using the Lua patterns (and string.gsub()): How can I match the double semicolons in the middle to replace those with a single one AND delete the last optional semicolon?
The output must be like this:
one;two;three;four;five;six;seven
Is this possible using a single pattern?