Skip to content

Instantly share code, notes, and snippets.

@jeffscottbrown
Created December 14, 2021 18:51
Show Gist options
  • Save jeffscottbrown/688799c622df993b28a0a6c4e3cc7a12 to your computer and use it in GitHub Desktop.
Save jeffscottbrown/688799c622df993b28a0a6c4e3cc7a12 to your computer and use it in GitHub Desktop.
String input = 'funnyplace'
String result = null
switch(input) {
case 'listed':
result = 'Not_listed'
break
case ~/fun.*place/:
result = 'FunPlace'
break
case ~/fun.*num/:
result = 'Num'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment