Here you can find the source of camelCase2Delimiter(String name, char delimiter)
private static String camelCase2Delimiter(String name, char delimiter)
//package com.java2s; //License from project: Apache License public class Main { private static String camelCase2Delimiter(String name, char delimiter) { if (name == null || !name.matches(".*[A-Z].*") || !name.matches(".*[a-z].*")) return name; String regex = "([a-zA-Z])([A-Z])"; String replacement = "$1" + delimiter + "$2"; return name.replaceAll(regex, replacement).replaceAll(regex, replacement); }// ww w. ja v a 2 s.c o m }