in reply to splitting punctuation in a text
Split takes a regex as its first argument, the string to be split as its second, and the maximum number of fields to be returned as the optional third. Write a capturing regex with the punctuation characters of interest, and, voila, there you have it.
As a piece of de rigueur advice: read the article "How do I post a question effectively?".
|
|---|