words = Str.split("[^\w']+");
Just add it to the character class. W
is equivalent to [^w]
, which you can then add '
to.
Do note, however, that w
also actually includes underscores. If you want to split on underscores as well, you should be using [^a-zA-Z0-9']
instead.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…