java - How to split a character without removing it (regex) -


this question has answer here:

i want split string @ point, keep character i'm splitting at. example:

input: a:b  output: : b 

is there anyway can use java's split() method? :)

you can use stringtokenizer class in java.

stringtokenizer stk = new stringtokenizer(inputstr,":", true); 

this return tokens delimiter.


Comments

Popular posts from this blog

visual studio - vb.net filter binding source by time -

php - SPIP: From Tag directly to an article -

jquery - isAjaxRequest always return false -