Split string every nth char

http://stackoverflow.com/questions/2297347/splitting-a-string-at-every-n-th-character



String[] tokens = s.split("(?<=\\G...)")

The regex (?<=\G...) matches an empty string that has the last match (\G) followed by three characters (...before it ((?<= ))

Comments

Popular posts from this blog

Sites, Newsletters, and Blogs

Oracle JDBC ReadTimeout QueryTimeout