#Regex Question

1 messages · Page 1 of 1 (latest)

fading aspen
#

it's just matches

#

you also only need one \

#

you also don't really need regex here

#

you can do set {_numbers::*} to arg-1 parsed as "%number%d%number%[[+]%number%]" i believe

copper crest
#

i didn't think of that. I guess I was too tunnel visioned on making this have unlimited modifiers and regex was the first thing to come to mind

#

Thanks this is super helpful

fading aspen
#

"%number%d%number%[(+|-)%number%]" i'd use this, and then check if arg-1 contains "-" to see if the modifier should be negative

copper crest
#

I'll try that. Thanks again

fading aspen
#

you should also learn how list variables work

#

[1] and such is not valid skript code

copper crest
#

Yeah new to skript, not to coding. Setting a few things up for some friends so they can modify it.

#

It should be {list::*} {list::1} correct?

fading aspen
#

{list::*} gets all the values
{list::1} gets the value with index 1

copper crest
#

So wildcard. Got it

fading aspen
#

yeah

#

also note that lists work like Maps (or dictionaries) much more than they do arrays

copper crest
#

Skript is certainly an interesting beast. i can't imagine how much work when into a full translator like this

#

Thanks Sovde

fading aspen
#

np
and you're right by saying interesting, it's a mess behind the scenes