of     1   

Krauzz
#143106083Saturday, August 09, 2014 7:02 PM GMT

I'm making an admin script and I'm trying to remove part of a string using Gsub. This is how it's supposed to work: -Player Chats: 'kill a /all/ //extra args//' -:Gsub('/.-/',''):Gsub('//.-//','') What I want to come out: 'kill a' What comes out: 'kill a all extra args' What am I doing wrong? Thanks in advanced
Krauzz
#143107203Saturday, August 09, 2014 7:11 PM GMT

b
Krauzz
#143108334Saturday, August 09, 2014 7:21 PM GMT

b2
sbk28
#143108403Saturday, August 09, 2014 7:21 PM GMT

do you just want to remove everything after the first "/" ?
sbk28
#143108780Saturday, August 09, 2014 7:25 PM GMT

if so i'd just recommend string:gsub("/", "\0")
Krauzz
#143109007Saturday, August 09, 2014 7:27 PM GMT

Um not everything just everything inside the /'s including the /'s itself. But I'll try that! Thanks
sbk28
#143110268Saturday, August 09, 2014 7:38 PM GMT

in that case could you not use string:gsub("/.+/", "") or string:gsub("/.*/", "")

    of     1