Answer the question
In order to leave comments, you need to log in
How to parse a string in Groovy?
You need to parse a string like arg1-arg2:arg3/arg4-arg5:arg6-arg7-arg8. What is the best way to parse a string into arguments?
Answer the question
In order to leave comments, you need to log in
def s = 'arg1-arg2:arg3/arg4-arg5:arg6-arg7-arg8'
def tokens = s.tokenize('-:/')
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question