richie
6 years agoCommunity Hero
Using Groovy's Split() to grab a specific string value
Hi,
Whenever I need to parse a string to grab a specific value from within the string I use this thing that counts from the right hand side and you just specify which chars you want to grab - e...
- 6 years ago
You can do this way also:-
def fullURL = "https://whatevs.azurewebsites.net/?token=eyJ0eXAiOiJKV1Qi&value=123456789"; String[] val = fullURL.split('&') for (String exp : val) { log.info exp.split('=')[1] }
It's just a suggestion. But nmrao solution would be the best approach to use proper groovy and coding standards.