Is there a simple way to convert MySQL data into Title Case?

Edit Eureka! Literally my first SQL function. No warranty offered. Back up your data before using. 🙂 First, define the following function: DROP FUNCTION IF EXISTS lowerword; SET GLOBAL log_bin_trust_function_creators=TRUE; DELIMITER | CREATE FUNCTION lowerword( str VARCHAR(128), word VARCHAR(5) ) RETURNS VARCHAR(128) DETERMINISTIC BEGIN DECLARE i INT DEFAULT 1; DECLARE loc INT; SET loc = … Read more

RegEx to split camelCase or TitleCase (advanced)

The following regex works for all of the above examples: public static void main(String[] args) { for (String w : “camelValue”.split(“(?<!(^|[A-Z]))(?=[A-Z])|(?<!^)(?=[A-Z][a-z])”)) { System.out.println(w); } } It works by forcing the negative lookbehind to not only ignore matches at the start of the string, but to also ignore matches where a capital letter is preceded by … Read more