Thread Tools Display Modes
01-31-15, 11:38 AM   #21
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,060
Originally Posted by Banknorris View Post
Code:
gsub(name,"%-[^ >]+","")
Very nice! What is the purpose of the % in this pattern? I tried without it "-[^ >]+" and it apparently still works.
% escapes the dash so it's treated as a literal character, since it normally has a special function.

At the start of a pattern it likely doesn't change its behavior since it typically acts on the character in front of it.
  Reply With Quote
01-31-15, 11:54 AM   #22
Banknorris
A Chromatic Dragonspawn
 
Banknorris's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 153
Ah ok, thanks.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » String strip


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off