(/([A-Z0-9][a-z]+)/g, ' $1 '); code example
Example: '[a-z0-9]+[_a-z0-9\.-]*[a-z0-9]+@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})' explained
^((http|ftp|https):\\/\\/w{3}\[\\d\]*.|(http|ftp|https):\\/\\/|w{3}\[\\d\]*.)(\[\\w\\d\\._\\-#\\(\\)\\\[\\\]\\,;:\]+@\[\\w\\d\\._\\-#\\(\\)\\\[\\\]\\,;:\])?(\[a-z0-9\]+.)*\[a-z\\-0-9\]+.(\[a-z\]{2,3})?\[a-z\]{2,6}(:\[0-9\]+)?(\\/\[\\/a-z0-9\\._\\-,\]+)*\[a-z0-9\\-_\\.\\s\\%\]+(\\?\[a-z0-9=%&\\.\\-,#\]+)?$