Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save masanobuimai/621826 to your computer and use it in GitHub Desktop.
Save masanobuimai/621826 to your computer and use it in GitHub Desktop.
// g100pon #22 正規表現:FQCNからクラス名を抜出す
fqcn = String.class.name
classname = fqcn.replaceAll(/(.*\.)(.+$)/) { full, m1, m2 -> m2 }
println classname
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment