Javascript examples for String Operation:String Split
Split a string by uppercase and lowercase using regex
<html> <head> <meta name="viewport" content="width=device-width"> </head> <body> <script> var s = "HOWtoDOthisAtest"; var t = s.replace(/((?:[A-Z]+)|([^A-Z]+))/g, '!!$&').split('!!'); console.log(t); </script> </body>//w ww. j ava 2 s . c om </html>