Paring parameters with regexp
Need help in parsing the parameters to my slash command. I am doing a slash command that takes two parameters in the form "myCmd param1 param2". However, the params can contain spaces and thus should be in "", but I still would like to not have that when they don't contain spaces. Example:
myCmd mace sword myCmd "mace of destruction" "sword of power" I guess I have to use string.find to get the parameters out, but how would I do??? Thanks Roberto |
You could try the following (I'm not sure it will work 'cause I haven't tested it, but I think it will):
Code:
function getparams(text) { |
All times are GMT -6. The time now is 05:55 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI