42

I'm trying to split a string with all non-alphanumeric characters as delimiters yet Java's String.split() method discards the delimiter characters from the resulting array. Is there a way to split a string like the "\W" regex pattern does, yet keep the delimiters?

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
mcjabberz
  • 9,788
  • 10
  • 36
  • 38

0 Answers0